Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
QUESTION Need Child menu for sidebar
#1
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
Reply
#2
(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
Reply
#3
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 } ?>
Reply




Users browsing this thread: 1 Guest(s)