GetSimple Support Forum

Full Version: Need Child menu for sidebar
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hiya

Been testing the child menu plugin and it works well for the first two levels but no further.

Any suggestion please. There don't appear to be many child menu options.

I want to show child pages of the current page the user clicks on.

Thanks
(2018-07-24, 00:11:15)cobber Wrote: [ -> ]Hiya

Been testing the child menu plugin and it works well for the first two levels but no further.

Any suggestion please. There don't appear to be many child menu options.

I want to show child pages of the current page the user clicks on.

Thanks

Hope this helps someone - found theseĀ linksĀ 

http://get-simple.info/wiki/config:caching-function
http://get-simple.info/forums/archive/in...-4114.html
Insert this in your sidebar template or component:

Code:
<?php
$subpages = getChildren(return_page_slug());
if (count($subpages) > 0) {
?>
<h3>Subpages:</h3>
<ul>
<?php
  foreach ($subpages as $subpage)
    if (returnPageField($subpage, 'private') != 'Y')
      echo '<li><a href="',find_url($subpage, returnPageField($subpage, 'parent')),'">', returnPageField($subpage, 'title'),'</a></li>',"\n";
?>
</ul>
<?php } ?>