Page 1 of 1

Printing the "Section" header of the page you are viewing.

Posted: Fri Dec 17, 2010 1:15 am
by steffeiter
Hi All-

I have been searching around and can't find a complete answer to my issue.

My hierarchy looks like this:

Products (sectionheader)
  - product 1 page
  - product 2 page
  - product 3 page

Solutions (sectionheader)
  - solutions 1 page
  - solutions 2 page
  - solutions 3 page


All I am trying to do is to print onto the currently viewed page the following statement.  
"This page is part of ***section***"

where ***section*** displays the section header for the section you are in.

I would like to be able to print it in the page template.

essentially the equivalent of {$sectionheader} or something like that.

I don't know why this is so hard to do, but it seems to be.

using 1.8.2 "Toliara" - on apache.

Re: Printing the "Section" header of the page you are viewing.

Posted: Fri Dec 17, 2010 2:22 am
by Wishbone
Install CGSimpleSmarty

The following line gets the parent page alias of the current page and assigns it to $alias:

Code: Select all

{$cgsimple->get_parent_alias('', 'alias')}
The next line gets the title of the alias and prints it out

Code: Select all

This page is part of {$cgsimple->get_page_title($alias)}