Hi,
In the template I would like to know the first parent_id of the hierarchy of the current page.
For example, if I am in this page:
http://www.somesite.com/a/b/c
I would like to get: a
Thank you!
[Solved] Get the first parent_id in the template
[Solved] Get the first parent_id in the template
Last edited by yabune on Thu Dec 04, 2008 6:15 pm, edited 1 time in total.
Re: Get the first parent_id in the template
http://wiki.cmsmadesimple.org/index.php ... .27s_alias
Replace
with
Regards,
D
Replace
Code: Select all
$result = $currentContent->Alias();
Code: Select all
$result = $currentContent->Id();
Regards,
D
-
- Support Guru
- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
- Location: Fernie British Columbia, Canada
Re: Get the first parent_id in the template
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 the first parent_id in the template
Thanks!
calguy1000 wrote: Installl the CGSimpleSmarty module
and useCode: Select all
{$cgsimple->get_root_alias()}