Include parent page title in submenu heading

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
elliot

Include parent page title in submenu heading

Post by elliot »

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
Last edited by elliot on Tue Mar 31, 2009 8:50 am, edited 1 time in total.
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Include parent page title in submenu heading

Post by RonnyK »

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
elliot

Re: Include parent page title in submenu heading

Post by elliot »

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

Re: [Solved] Include parent page title in submenu heading

Post by elliot »

Actually, it would be better if you could get the root page title, you can get root page alias but not title??

E
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: [Solved] Include parent page title in submenu heading

Post by RonnyK »

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
elliot

Re: [Solved] Include parent page title in submenu heading

Post by elliot »

Ronny, thanks - we are approaching the outer limits of my coding abilities, but I will give this a shot a bit later.

E
elliot

Re: Include parent page title in submenu heading

Post by elliot »

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.
elliot

Re: [Solved] Include parent page title in submenu heading

Post by elliot »

RonnyK 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
Can anyone help me out with this bit of code, its beaten me i'm afraid
Locked

Return to “Layout and Design (CSS & HTML)”