GetSimple Support Forum
QUESTION Need Child menu for sidebar - Printable Version

+- GetSimple Support Forum (http://get-simple.info/forums)
+-- Forum: GetSimple (http://get-simple.info/forums/forumdisplay.php?fid=3)
+--- Forum: Plugins (http://get-simple.info/forums/forumdisplay.php?fid=13)
+--- Thread: QUESTION Need Child menu for sidebar (/showthread.php?tid=10561)



Need Child menu for sidebar - cobber - 2018-07-24

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


RE: Need Child menu for sidebar - craiga - 2018-07-25

(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/index.php?thread-4114.html


RE: Need Child menu for sidebar - Carlos - 2018-07-25

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 } ?>