calguy1000 wrote: Four new methods in the CustomContent module do this:
$ccuser->get_parent_alias($alias = '') get_root_alias($alias = '') get_page_title($alias = '') has_children($alias = '') get_parent_alias($alias = '')[/i] method? I can’t put this as smarty tag like {$ccuser->get_parent_alias($alias = '')}, this would give an error. I’m getting frustrated as I’ve been looking for a solution for this and none of the posts I found helped me because they didn’t really explain things properly. That other thread has brought me quite a step forward but I need to get the direct parent alias, not the root alias. How would I go about that?
Thanks for any help.
Get parent page alias
-
10010110
Get parent page alias
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Get parent page alias
{$ccuser->get_parent_page_alias()}
the = '' stuff is code indicating that the parameter is optional.
the = '' stuff is code indicating that the parameter is optional.
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.
-
10010110
Re: Get parent page alias
Thanks calguy. I must be doing something wrong, though, because if I put this as value in my template’s body’s ID I’m getting:
What am I doing wrong? Do I have to put that somewhere else? I have CustomContent 1.4.10, by the way (no user set up, though, as I don’t have sepcific content for certain users to show, I only wanna get the direct parent alias).Fatal error: Call to undefined method ccUser::get_parent_page_alias() in […]/www/cms/tmp/templates_c/%%7E^7E8^7E8F1701%%template%3A20.php on line 34
-
calguy1000
- Support Guru

- Posts: 8169
- Joined: Tue Oct 19, 2004 6:44 pm
Re: Get parent page alias
OOOPS:
outputs the page alias of the parent page, or empty if the specified page does not have a parent (is at the top). This function will accept a page alias as an argument, if no page alias is specified, the current page is assumed.
outputs the page alias of the topmost parent page, or empty if the specified page does not have a parent (is at the top). This function will accept a page alias as an argument, if no page alias is specified, the current page is assumed.
outputs the title of the page matching the supplied alias. This function will accept a page alias as an argument, if no page alias is specified, the current page is assumed.
outputs a boolean indicating if the specified page has child pages or not. This function will accept a page alias as an argument, if no page alias is specified, the current page is assumed.
Code: Select all
$ccuser->get_parent_alias($alias) Code: Select all
$ccuser->get_root_alias($alias)Code: Select all
$ccuser->get_page_title($alias)Code: Select all
$ccuser->has_children($alias)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.
