Hi, I am trying to figure it out but so far no setting or luck on thsi one (yet).
I have got a top level page and a series of sub-level pages. The pages are all published but they are only displayed in the menu when the top level page is activated. How can I change it so that the sub-poages are always shown?
Cheers
Comments
`
foreach ($pages as $page) {
$pageobj = new ZenpagePage($page['titlelink']);
$level = max(1,count(explode('-', $pageobj->getSortOrder())));
$process = (($option == 'list' || $option == 'list-top') && $level==1 // show the top level
|| (($option == 'list' || ($option == 'omit-top' && $level>1))
&& (($pageobj->getID() == $pageid) // current page
|| ($pageobj->getParentID()==$pageid) // offspring of current page
|| ($level <= $mylevel && $level > 1 && strpos($pageobj->getSortOrder(), $myparentsort) === 0)) // direct ancestor
)
|| ($option == 'list-sub'
&& ($pageobj->getParentID()==$pageid) // offspring of the current page
)
);
if ($process) {
if ($level > $indent) {
echo "\n".str_pad("\t",$indent,"\t")."
\n";
$indent++;
$parents[$indent] = NULL;
$open[$indent] = 0;
} else if ($level < $indent) {
$parents[$indent] = NULL;
while ($indent > $level) {
if ($open[$indent]) {
$open[$indent]--;
echo "\n";
}
$indent--;
echo str_pad("\t",$indent,"\t")."\n";
}
} else { // level == indent, have not changed
if ($open[$indent]) { // level = indent
echo str_pad("\t",$indent,"\t")."\n";
$open[$indent]--;
} else {
echo "\n";
}
}
`
Not really sure part to edit, but I am thinking the `$level > $indent` part but not sure?