WebsiteBaker Logo
  • *
  • Templates
  • Help
  • Add-ons
  • Download
  • Home
*
Welcome, Guest. Please login or register.

Login with username, password and session length
 

News


WebsiteBaker 2.13.9 R24 is now available!


R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WB
https://forum.websitebaker.org/index.php/topic,32355.0.html


* Support WebsiteBaker

Your donations will help to:

  • Pay for our dedicated server
  • Pay for domain registration
  • and much more!

You can donate by clicking on the button below.


  • Home
  • Help
  • Search
  • Login
  • Register

  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Showmenu help: display parent page_title if it exists else...
  • Print
Pages: [1]   Go Down

Author Topic: Showmenu help: display parent page_title if it exists else...  (Read 4543 times)

margiematteson

  • Guest
Showmenu help: display parent page_title if it exists else...
« on: December 21, 2008, 03:21:19 PM »
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.
Logged

margiematteson

  • Guest
Re: Showmenu help: display parent page_title if it exists else...
« Reply #1 on: March 02, 2009, 12:55:02 AM »
I never did get an answer to this, but I did find a workable solution on my own. I used this code:

Code: [Select]
<?php show_menu2(0, SM2_ROOT, SM2_CURR, SM2_CRUMB,
&
#39;[if(id==parent){ [page_title] &raquo; <br />}else{ [page_title] }]&#39;,&#39;&#39;,&#39;&#39;,&#39;&#39;); ?>
</h3>
        <?php show_menu(1,1,1,true,&#39;<li><span[class]>[a][menu_title][/a]</span>&#39;,     &#39;</li>&#39;); ?>

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!
Logged

  • Print
Pages: [1]   Go Up
  • WebsiteBaker Community Forum »
  • WebsiteBaker Support (2.8.x) »
  • Templates, Menus & Design »
  • Showmenu help: display parent page_title if it exists else...
 

  • SMF 2.0.19 | SMF © 2017, Simple Machines
  • XHTML
  • RSS
  • WAP2