';
$html .= ''.$parent->title().'';
- // Check if the parent has children
- if(isset($pagesParents[$parent->key()]))
- {
- $children = $pagesParents[$parent->key()];
+ // Show children elements?
+ if($this->getDbField('childrens')) {
- // Print children
- $html .= '
';
- foreach($children as $child)
+ // Check if the parent has children
+ if(isset($pagesParents[$parent->key()]))
{
- // Check if the child is published
- if( $child->published() )
+ $children = $pagesParents[$parent->key()];
+
+ // Print children
+ $html .= '