dbFields = array(
'homeLink'=>true,
'label'=>'Pages'
);
}
public function form()
{
global $Language;
$html = '
';
// Print the label if not empty.
$label = $this->getDbField('label');
if( !empty($label) ) {
$html .= '
'.$label.'
';
}
$html .= '
';
$html .= '
';
// Show home link ?
if($this->getDbField('homeLink')) {
$html .= '- ';
$html .= ''.$Language->get('Home').'';
$html .= '
';
}
$parents = $pagesParents[NO_PARENT_CHAR];
foreach($parents as $parent)
{
// Check if the parent is published
if( $parent->published() )
{
// Print the parent
$html .= '- ';
$html .= ''.$parent->title().'';
// Check if the parent has children
if(isset($pagesParents[$parent->key()]))
{
$children = $pagesParents[$parent->key()];
// Print children
$html .= '
';
foreach($children as $child)
{
// Check if the child is published
if( $child->published() )
{
$html .= '- ';
$html .= ''.$child->title().'';
$html .= '
';
}
}
$html .= '
';
}
}
}
$html .= '
';
$html .= '
';
$html .= '
';
return $html;
}
}