dbFields = array(
'homeLink'=>true,
'label'=>'Pages'
);
}
public function form()
{
global $Language;
$html = '
';
// Print the label if it not empty.
$label = $this->getDbField('label');
if( !empty($label) ) {
$html .= '
'.$label.'
';
}
$html .= '
';
$parents = $pagesParents[NO_PARENT_CHAR];
$html .= '
';
if($this->getDbField('homeLink')) {
$current = ($Site->homeLink()==$home) ? ' class="active"' : '';
$html .= '- '.$Language->get('Home').'
';
}
foreach($parents as $parent)
{
//if($Site->homepage()!==$parent->key())
{
$current_parent = ($parent->slug()==$Url->slug()) ? ' class="active"' : '';
// Print the parent
$html .= '- '.$parent->title().'';
// Check if the parent has children
if(isset($pagesParents[$parent->key()]))
{
$children = $pagesParents[$parent->key()];
// Print the children
$html .= '
';
foreach($children as $child)
{
$current_child = ($child->slug()==$Url->slug()) ? ' class="active"' : '';
$html .= '- '.$child->title().'
';
}
$html .= '
';
}
}
}
$html .= '
';
$html .= '
';
$html .= '
';
return $html;
}
}