Skip to content

Commit

Permalink
Allow no categories/no items in datagrid
Browse files Browse the repository at this point in the history
  • Loading branch information
jessedobbelaere committed Feb 16, 2015
1 parent d755693 commit f96e5eb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Backend/Modules/Menu/Actions/Alacarte.php
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,8 @@ protected function loadDataGrid($categoryId, $categoryName)
protected function parse()
{
// parse the dataGrid if there are results
$this->tpl->assign('dataGrids', $this->dataGrids);
if (isset($this->dataGrids)) {
$this->tpl->assign('dataGrids', $this->dataGrids);
}
}
}
4 changes: 4 additions & 0 deletions src/Backend/Modules/Menu/Layout/Templates/Alacarte.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,9 @@
{/iteration:dataGrids}
{/option:dataGrids}

{option:!dataGrids}
<p>{$msgNoItems}</p>
{/option:!dataGrids}

{include:{$BACKEND_CORE_PATH}/Layout/Templates/StructureEndModule.tpl}
{include:{$BACKEND_CORE_PATH}/Layout/Templates/Footer.tpl}

0 comments on commit f96e5eb

Please sign in to comment.