Page 1 of 1

[SOLVED] How to display parent title of page when this is a section header

Posted: Sun Dec 13, 2009 2:27 pm
by AlejandroCM
Hi All,

Since I am new to both the CMSMS and this forum let me start by saying I've only been using CMSMS for 3 months now and am already in love with it. Although not a programmer, I have been involved in web design (not development) for 6 years now so I have a certain understanding of HTML and CSS. Needless to say CMSMS has saved my life since most of the time I cannot afford to pay a developer for content management driven sites and have to rely on the help of friends.

I am using version 1.6.5 and have spent 3 days and 3 nights (well....half-nights :) ...a man has to sleep even for 5 hours ) googling and searching for this issue and trying various things but to no avail.

My issue is this:

I have a category home page called Products (content page) which are divided into 3 categories i.e. A Products, B Products, C Products. Each of these in turn have many children (children being content pages as well). However, the 3 categories (A,B and C) are not content pages and I do not want them to act as links even though I need them to appear on the menu hierarchy. So I made them into Section Headers.

Unfortunately though I need each children page to display at the top the title of its respective section header!

e.g. You are in A Products or You are in B Products

Since section headers are not treated as part of the hierarchy by the CMS I can only get the children page to display Products as a title which is the topmost category and not the immediate above.

Am I doing this the wrong way? As I said I am incapable of finding an answer myself through searching the net so any help will be extremely appreciated.

I thank you in advance.

Alex

[UPDATE]

Tried {breadcrumbs} and it does indeed treat the section header as part of the hierarchy displaying it properly.
Now it's a matter of removing the previous and current titles from the breadcrumb string output so from Products >> A Products >> Current Product make it so it just says A Products

Any ideas? Apologies if my questions appear trivial to the most experienced but to me they are mountains :)

Re: How to display parent title of page when this parent is a section header?

Posted: Sun Dec 13, 2009 8:09 pm
by Dr.CSS
Have you searched the forum for parent page title?..

Like...  http://forum.cmsmadesimple.org/index.ph ... 458.0.html

Re: How to display parent title of page when this parent is a section header?

Posted: Sun Dec 13, 2009 11:27 pm
by AlejandroCM
Thanks Dr.

I actually did search the forum and did indeed come across this post. Maybe my limited knowledge prevented me from seeing that it provided a solution to my problem. Will look into it further and update my original query appropriately.

Many thanks! :)

Re: How to display parent title of page when this parent is a section header?

Posted: Mon Dec 14, 2009 9:48 am
by AlejandroCM
Well, I tried your tags but they return the title or alias of the topmost parent Products and not the Section Header: A Products which is the parent of the page.

I had figured out how to output the topmost parent by myself :).

So unfortunately, my original question on how to output the menu name of the parent section header remains.

Re: How to display parent title of page when this parent is a section header?

Posted: Mon Dec 14, 2009 2:37 pm
by Dr.CSS
Actually the first one outputs the root parent alias, in your case products, the second one outputs the parent, in your case A products...

Re: How to display parent title of page when this parent is a section header?

Posted: Mon Dec 14, 2009 3:04 pm
by AlejandroCM
Absolutely right!

I must have done something wrong the first time i tried! Works like a charm!

Grateful and obliged!

Now in order to change it so that it displays the menu text instead of page alias would i change

$var = 'parent_page_alias';   to  $var = 'parent_menu_text';   in the UDT

and

{nextup assign="parent_page_alias"}{$parent_page_alias}   to   {nextup assign="parent_menu_text"}{$parent_menu_text}

in the template tag?

Please say it's as easy as that...

P.S. my graphic design skills are at your service any time

Re: How to display parent title of page when this parent is a section header?

Posted: Mon Dec 14, 2009 3:08 pm
by Dr.CSS
Look to the last one to see where menutext is placed/called...

Re: How to display parent title of page when this parent is a section header?

Posted: Mon Dec 14, 2009 3:35 pm
by AlejandroCM
I've already tried that on and it keeps returning the topmost parent as you can see:

[link removed]

both

{menutext assign="parent_page_menutext"}{$parent_page_menutext} in template with $var = 'parent_page_menutext'; in UDT

and

{menutext assign="root_page_menutext"}{$root_page_menutext} in template with $var = 'root_page_menutext'; in UDT

return Industrial rather than Thermal Processing

Re: How to display parent title of page when this parent is a section header?

Posted: Mon Dec 14, 2009 4:17 pm
by AlejandroCM
OK...took me a while but I finally realised what you were trying to tell me!

I got your second tag and replaced alias with menutext everywhere and it now works perfectly!

Many thanks again and please send me a pm if you even need any graphic design work. I'm pretty good at that...