Skip to content

Commit

Permalink
don't show pages and containers in node list
Browse files Browse the repository at this point in the history
  • Loading branch information
norbertlaposa committed Sep 14, 2021
1 parent a122d97 commit 0901e3c
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions controllers/bo/component/node_list.php
@@ -1,6 +1,6 @@
<?php
/**
* Copyright (c) 2007-2016 Laposa Limited (https://laposa.ie)
* Copyright (c) 2007-2021 Laposa Limited (https://laposa.ie)
* Licensed under the New BSD License. See the file LICENSE.txt for details.
*
*/
Expand Down Expand Up @@ -39,13 +39,14 @@ public function mainAction() {
$this->tpl->assign("NODE", $node_detail);

//get children
$children = $Node->getChildren($node_detail['id'], 'parent_container ASC, title ASC');
$children = $Node->getChildren($node_detail['id'], 'parent_container ASC, priority DESC, id ASC');

if (is_array($children) && count($children) > 0) {
foreach ($children as $child) {
if ($child['publish'] == 0) $child['class'] = 'disabled';
$this->tpl->assign("CHILD", $child);
$this->tpl->parse('content.children.item');
if (in_array($child['node_group'], ['page', 'container'])) continue;
else $this->tpl->parse('content.children.item');
}
$this->tpl->parse('content.children');
} else {
Expand Down

0 comments on commit 0901e3c

Please sign in to comment.