[SOLVED] Internal Page Link layout?

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

[SOLVED] Internal Page Link layout?

Post by manuel »

Dear All,

I can't seem to find any information about how to define the layout of the Internal Page Links.
This seems to be easy enough for the section header and the separator...

From the template file (modules/MenuManager/templates/*******.tpl)

Code: Select all

{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />
Is there an equivalent for Internal Page Links?
ex: {elseif $node->type == 'internalpagelink'} doesn't work   :-\

Greetings,
Manuel
Last edited by manuel on Mon Feb 16, 2009 10:10 am, edited 1 time in total.
Do you like your open source cms? Buy from the CMSMS partners || Donate
viebig

Re: Internal Page Link layout?

Post by viebig »

In fact, its possible to write a UDT and check if the link domain is from internal links...

This way it´s possible to switch that information.

Regards

G
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: Internal Page Link layout?

Post by manuel »

Dear G,

I guess this is a bit out of my league...  :-[

Is this something that might be included in the next cmsms release?

For now, I'll try replacing the Internal Page Links with Section Headers.
To make the Section Headers behave like Internal Page links, I'll try the following:
http://wiki.cmsmadesimple.org/index.php/User_Handbook/Admin_Panel/Layout/Menu_Manager#header_link_to_child_dont_show_children

Greetings,
manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
viebig

Re: Internal Page Link layout?

Post by viebig »

Can you define "Internal Page Links" fo me ?
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: Internal Page Link layout?

Post by manuel »

It's one of the content types you can select when creating new pages.

List of content types:
  • external link
  • content
  • separator
  • internal page link
  • section header
In the default simple_navigation.tpl (for the menu layout) it's possible to define the layout for the following items:
  • currentpage
  • activeparent
  • sectionheader
  • separator
Would it be possible to also define the layout for Internal Page Links in this simple_navigation.tpl?
Could this be accomplished by the use of smarty code similar to the already existing code?

Code: Select all

{elseif $node->type == 'sectionheader'}
<li class="sectionheader">{$node->menutext}

{elseif $node->type == 'separator'}
<li class="separator" style="list-style-type: none;"> <hr />
Do you like your open source cms? Buy from the CMSMS partners || Donate
fredp
Forum Members
Forum Members
Posts: 218
Joined: Sun Jul 27, 2008 1:36 am

Re: Internal Page Link layout?

Post by fredp »

manuel wrote: ...
Is there an equivalent for Internal Page Links?
ex: {elseif $node->type == 'internalpagelink'} doesn't work   :-\
...
Hi,

Based on 1.5.2 code, the following appears to be the case:

    Internal Page Link is type'pagelink'
    External Link is type 'link'

Hope this helps,
Fred P.
Nearly all men can stand adversity, but if you want to test a man's character, give him power.
- Abraham Lincoln
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: Internal Page Link layout?

Post by manuel »

Dear Fred,

This is probably exactly what I needed to know!!

My issue now is to get the menu template code to recognize the parent of the page being shown is an internal page link...
The parent page (the internal page link) is shown in the menu but the children are hidden.

The goal?? Setting the layout for the menu item to "currentpage" for any internal page link shown in the menu even when it's actually one of it's children being show...

below you can see my pitiful attempts to find the correct smarty template code  :-[

Code: Select all

{elseif internalpage->parent == true}
<li class="currentpage">{$node->menutext}

Code: Select all

{elseif 'internalpage'->parent == true}
<li class="currentpage">{$node->menutext}

Code: Select all

{elseif $node->parent == 'internalpage'}
<li class="currentpage">{$node->menutext}

Code: Select all

{elseif $node->parent == internalpage}
<li class="currentpage">{$node->menutext}

Code: Select all

{elseif $node->prevdepth == internalpage}
<li class="currentpage">{$node->menutext}

Code: Select all

{elseif $node->prevdepth == 'internalpage'}
<li class="currentpage">{$node->menutext}

Code: Select all

{elseif $node->prevdepth == internalpage == true}
<li class="currentpage">{$node->menutext}

Code: Select all

{elseif internalpage == true}
<li class="currentpage">{$node->menutext}

Code: Select all

{elseif internalpage->parent == true}
<li class="currentpage">{$node->menutext}
Do you like your open source cms? Buy from the CMSMS partners || Donate
User avatar
Dr.CSS
Moderator
Moderator
Posts: 12711
Joined: Thu Mar 09, 2006 5:32 am

Re: Internal Page Link layout?

Post by Dr.CSS »

Most times you will look in the page source of rendered page, meaning you have a menu on home page open home page in browser see links in menu right click page and 'view source' here you will see the class or id used for the li and a of the link, to find the code in menu manager template that makes this so I use numbers in the mm template put them in diff. places render page look at source and look where numbers appear, rinse repeat till you find what you need...
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: Internal Page Link layout?

Post by manuel »

Dear Mark,

I often use this method while working on the menu layouts!
While preparing for my reply to you, (completely convinced it wouldn't work) i tested it again, noticed I was trying to fix the wrong template.... problem solved!

I must apologize as this was clearly a case of "Stupid User Syndrome"  ;D

Code: Select all

{elseif $node->parent == true}
<li title="2"><a class="currentpage"...

Greetings,
Manuel
Do you like your open source cms? Buy from the CMSMS partners || Donate
Locked

Return to “Layout and Design (CSS & HTML)”