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
I am assuming you are using the printPageMenu() function. Unfortunately, it does not provide an option to do just what you wish. You would have to create a custom function to do that. You should be able to copy the existing printPageMenu() function from the zenpage-template-functions.php script. The calculaton that sets $process is what you want to change. If you just set $process to true, all pages will be shown. If you want something more selective than that, you will have to code the conditions.
Ok, I am assuming you mean this part
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 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?