[solved] Limit selflink to menu level

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
klsgfx
New Member
New Member
Posts: 2
Joined: Wed Mar 31, 2010 7:00 pm

[solved] Limit selflink to menu level

Post by klsgfx »

I am facing the following challenge:  I have a menu which is four or five levels deep. The frist two levels are displayed with the {menu}-tag as a list on the page. For levels three and deeper I want only a next/previous-link instead of a detailed structure.

Is there any way of limiting cms_selflink to a defined menu-level?

Example:
This is the structure
1
2
- 2.1
- 2.2
- - 2.2.1
- - 2.2.2
- - 2.2.3
- 2.3
etc...


I only want to display

1
2
- 2.1
- 2.2
- 2.3
etc...

And I want to show on 2.2.1 a link to 2.2.2 and on 2.2.2 a link to 2.2.1 and 2.2.3 and on 2.2.3 only a link to 2.2.2

Can anyone help me and point me in the right direction how to accomplish this?
(I hope I could make myself understandable.)
Last edited by klsgfx on Wed Mar 31, 2010 10:25 pm, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm

Re: Limit selflink to menu level

Post by calguy1000 »

Look at the help for CGSimpleSmarty
it has functions to retrieve the id's of the next and previous sibling.
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.
klsgfx
New Member
New Member
Posts: 2
Joined: Wed Mar 31, 2010 7:00 pm

Re: Limit selflink to menu level

Post by klsgfx »

calguy1000 wrote: Look at the help for CGSimpleSmarty
it has functions to retrieve the id's of the next and previous sibling.
Great, thank you, that did the trick.
User avatar
amh
Forum Members
Forum Members
Posts: 187
Joined: Sun Apr 17, 2005 2:40 pm

Re: [solved] Limit selflink to menu level

Post by amh »

Hi!

Just add {$node->hierarchy} to your menu template and you don't need an extra plug-in.

Best regards Andreas
__/\_|\/|_|-|__  --  designer not coder
Post Reply

Return to “CMSMS Core”