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


Messages In This Thread
Need Child menu for sidebar - by cobber - 2018-07-24, 00:11:15
RE: Need Child menu for sidebar - by craiga - 2018-07-25, 01:19:06
RE: Need Child menu for sidebar - by Carlos - 2018-07-25, 01:20:59



Users browsing this thread: 1 Guest(s)