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!
Get parent title inside template
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Get parent title inside template
it's something like:
the customcontent help should give you the exact name of the function.
Code: Select all
{capture assign='parent_page'}{$ccuser->parent_page_alias()}{/capture}
{if $parent_page == 'whatever'}
<div id='blah'>
...
</div>
{/if}
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Re: Get parent title inside template
This topic
http://forum.cmsmadesimple.org/index.ph ... l#msg53453
describes a UDT that will give you back the parents alias as well.
Ronny
http://forum.cmsmadesimple.org/index.ph ... l#msg53453
describes a UDT that will give you back the parents alias as well.
Ronny