Page 1 of 1

Get parent title inside template

Posted: Wed Dec 05, 2007 7:32 pm
by yabune
Hi,

Is it possible to check in the template, if the current page has a certain parent?

I know $page gives me the current page, what about its parent?

I would like to add a div if I'm inside a certain parent page.

Thanks!

Re: Get parent title inside template

Posted: Wed Dec 05, 2007 7:51 pm
by calguy1000
it's something like:

Code: Select all

{capture assign='parent_page'}{$ccuser->parent_page_alias()}{/capture}
{if $parent_page == 'whatever'}
  <div id='blah'>
     ...
  </div>
{/if}
the customcontent help should give you the exact name of the function.

Re: Get parent title inside template

Posted: Wed Dec 05, 2007 8:08 pm
by RonnyK
This topic

http://forum.cmsmadesimple.org/index.ph ... l#msg53453

describes a UDT that will give you back the parents alias as well.

Ronny