Showmenu help: display parent page_title if it exists else...

margiematteson

I never did get an answer to this, but I did find a workable solution on my own. I used this code:

<?php show_menu2(0SM2_ROOTSM2_CURRSM2_CRUMB,
'[if(id==parent){ [page_title] &raquo; <br />}else{ [page_title] }]','','',''); ?>
</h3>
        <?php show_menu(1,1,1,true,'<li><span[class]>[a][menu_title][/a]</span>',     '</li>'); ?>


which results in a breadcrumb-style label for the current location. You can see this in action at www.performancedev.com. Hope this helps someone else!

If anyone knows how to get it to work as I asked in the original post, that would still be helpful, I'm sure. Thanks!

margiematteson

I'm using showmenu2 to show section menus on my site. Everything's great, except that I want to put the section title above the menu. So I tried this

show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB,
'[if(id==parent){ [page_title] }]','','','');
show_menu2(1,1,1);


Works great on the subpages, but no heading shows on the top level page.

I want something like

About Us

  • Our Approach
  • Staff
  • Testimonials

If I put try to test it for parent and use this code instead:

show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB,
'[if(id==parent){ [page_title] }else{ [page_title] }]','','','');


the top level works perfectly, but I get both the section title and the page title above the list on the subpages.

What am I doing wrong? I checked the documentation, but no examples are formatted like this. I know I must be close, but I can't seem to get it working.

Thank you.