Hello
Ive got a horizontal top menu for my level 1 links and a vertical submenu in the sidebar for the children of the L1 links. In my sidebar I would like a heading above the menu so that if for instance I was in the 'About Us' section the vertical sub menu in the sidebar would have a heading saying 'About Us Menu'.
Ive got the heading to appear in the sidebar when there are children to display - but how do I get the name of the parent page?
Does this make any sense at all?
Please help if it does
Include parent page title in submenu heading
-
elliot
Include parent page title in submenu heading
Last edited by elliot on Tue Mar 31, 2009 8:50 am, edited 1 time in total.
Re: Include parent page title in submenu heading
CGSimpleSmarty has some parameters that can be called/used. IIRC is the get_parent_alias or get_page_title inside.
You could check this module to see, if that works for you.
Ronny
You could check this module to see, if that works for you.
Ronny
-
elliot
Re: Include parent page title in submenu heading
I love it round here, thanks RonnyK.
Installed CGSimpleSmarty and included this in sub nav tpl:
{$cgsimple->get_page_title()} Menu ››
Result: About Us Menu ››
ta daa!!!
Installed CGSimpleSmarty and included this in sub nav tpl:
{$cgsimple->get_page_title()} Menu ››
Result: About Us Menu ››
ta daa!!!
-
elliot
Re: [Solved] Include parent page title in submenu heading
Actually, it would be better if you could get the root page title, you can get root page alias but not title??
E
E
Re: [Solved] Include parent page title in submenu heading
Elliot,
IIRC is it possible in two-steps.... Check the CGSimpleSmartys help for the examples.
You can FIRST, get the root_page_alias, and assign that to a variable, using the parameter in the example,
and SECOND, get the name of the page, for the page, with the variable you just set.
Ronny
IIRC is it possible in two-steps.... Check the CGSimpleSmartys help for the examples.
You can FIRST, get the root_page_alias, and assign that to a variable, using the parameter in the example,
and SECOND, get the name of the page, for the page, with the variable you just set.
Ronny
-
elliot
Re: [Solved] Include parent page title in submenu heading
Ronny, thanks - we are approaching the outer limits of my coding abilities, but I will give this a shot a bit later.
E
E
-
elliot
Re: Include parent page title in submenu heading
Hello again, can anybody help me out with the code for this, turned out to be a bit beyond me Im afraid.
Using root page alias is ok, but it has a hyphen so the result is: about-us menu, what I could do with is the root page title but I cant figure out how to do it with the varaible as suggested above.
Using root page alias is ok, but it has a hyphen so the result is: about-us menu, what I could do with is the root page title but I cant figure out how to do it with the varaible as suggested above.
-
elliot
Re: [Solved] Include parent page title in submenu heading
Can anyone help me out with this bit of code, its beaten me i'm afraidRonnyK wrote: Elliot,
IIRC is it possible in two-steps.... Check the CGSimpleSmartys help for the examples.
You can FIRST, get the root_page_alias, and assign that to a variable, using the parameter in the example,
and SECOND, get the name of the page, for the page, with the variable you just set.
Ronny

