dbFields = array(
'homeLink'=>1,
'label'=>'Pages'
);
}
public function form()
{
$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 .= ''.$this->L('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 .= '
';
$html .= '
';
return $html;
}
}