Page 1 of 1

[SOLVED] Internal Page Link layout?

Posted: Fri Feb 06, 2009 3:18 pm
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

Re: Internal Page Link layout?

Posted: Fri Feb 06, 2009 3:22 pm
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

Re: Internal Page Link layout?

Posted: Sun Feb 08, 2009 10:23 am
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

Re: Internal Page Link layout?

Posted: Sun Feb 08, 2009 2:31 pm
by viebig
Can you define "Internal Page Links" fo me ?

Re: Internal Page Link layout?

Posted: Mon Feb 09, 2009 10:16 am
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 />

Re: Internal Page Link layout?

Posted: Mon Feb 09, 2009 11:21 am
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.

Re: Internal Page Link layout?

Posted: Fri Feb 13, 2009 2:30 pm
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}

Re: Internal Page Link layout?

Posted: Fri Feb 13, 2009 10:04 pm
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...

Re: Internal Page Link layout?

Posted: Mon Feb 16, 2009 10:10 am
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