Page 1 of 1

[SOLVED]Get menu to stop at given element

Posted: Thu Oct 07, 2010 6:33 am
by lena.pfaff
Hi there

Now i really do need your help again

I have tried many many many things and read a lots of topic without any luck. :-[

I am using:
CMS Version 1.8
MenuManager 1.6.5

My menu could look like this:

Home
1.Dogs
     -1.1 Food
     -1.2 Coat

2.Cats
     -2.1 Food2
     -2.2 Coat2

3.Contact

In one menu I need to start at a given element.
That is NO problem:

I use the parametre: start_element="2"
Like this: {menu template='simple_navigation.tpl' start_element="2"}

But... In another menu I need to start and stop at a given element.
I have tried all the parametre in menu manager help, with out any luck.
I can't get it to stop, and still show the children of the elements I choose to show before I stop the menu!

Can someone help me

Thanz in advance

Pfaff

Re: Get menu to stop at given element

Posted: Thu Oct 07, 2010 10:50 am
by spcherub
The are couple of things I would try but not knowing your exact requirements I'm not sure if they are applicable to your case or not. But here goes ...

If the ID or title of the page you want to stop at is known, you could add a check inside the foreach loop in the menu template and have it quit the loop at that point. Of course you will need to make sure that all list elements tags are closed etc. You can use either ID of page title or even menu title for this.

If you only need to support one of the menu at a time on a page, then you can simply unselect the show in menu option of the pages that you don't want to appear in the menu. This of course won't work if you have to support both types of menu you have listed in your post at the same time.

The third option is to use CGSimpleSmarty and write you own menu loop with start and stop conditions.

Hope that helps.

Sanjay

Re: Get menu to stop at given element

Posted: Thu Oct 07, 2010 3:42 pm
by Dr.CSS
You need to show the whole menu structure and say what is to be shown and what is not to be shown and when these things are to occur...

Re: Get menu to stop at given element

Posted: Fri Oct 08, 2010 6:23 am
by lena.pfaff
spcherub wrote: The are couple of things I would try but not knowing your exact requirements I'm not sure if they are applicable to your case or not. But here goes ...

If the ID or title of the page you want to stop at is known, you could add a check inside the foreach loop in the menu template and have it quit the loop at that point. Of course you will need to make sure that all list elements tags are closed etc. You can use either ID of page title or even menu title for this.

If you only need to support one of the menu at a time on a page, then you can simply unselect the show in menu option of the pages that you don't want to appear in the menu. This of course won't work if you have to support both types of menu you have listed in your post at the same time.

The third option is to use CGSimpleSmarty and write you own menu loop with start and stop conditions.

Hope that helps.

Sanjay
Hi Sanjay

Thank you so much for trying to help me. :)

But I must confess that my knowledge about the things that you wrote not is enough, to try out your suggestions.

I am just about to learn about php and javascript :P
I am learning every day, also from this forum.

This is the site that I need to change: www.abrahamsenhorse.dk

I have commented the 3 options from you

1) This I do not understand: "add a check inside the foreach loop"
2) I need to support both of them at the same time, so that is not an option
3) I have installed this: CGSimpleSmarty, but I do not know how to use it.

So as you can see I am fu... sorry my language

If you do´nt want to help such a newbie further, that is allright.
I know that I have a long way still to go.

Lena

Re: Get menu to stop at given element

Posted: Fri Oct 08, 2010 6:38 am
by lena.pfaff
Dr.CSS wrote: You need to show the whole menu structure and say what is to be shown and what is not to be shown and when these things are to occur...
Hi Dr. CSS
Thank you also, for trying to help me. I really appreciate it.

I have attached a jpg of the menu structure... Will that do?

I need:
  • first menu to go from: element 2 to element 3.5.3
  • second menu to go from: element 4 to element 6.
Please let me know if this is not enough info

Regards Lena

Re:[SOLVED] Get menu to stop at given element

Posted: Fri Oct 08, 2010 7:24 am
by lena.pfaff
lena.pfaff wrote: Hi there

Now i really do need your help again

I have tried many many many things and read a lots of topic without any luck. :-[

I am using:
CMS Version 1.8
MenuManager 1.6.5

My menu could look like this:

Home
1.Dogs
      -1.1 Food
      -1.2 Coat

2.Cats
      -2.1 Food2
      -2.2 Coat2

3.Contact

In one menu I need to start at a given element.
That is NO problem:

I use the parametre: start_element="2"
Like this: {menu template='simple_navigation.tpl' start_element="2"}

But... In another menu I need to start and stop at a given element.
I have tried all the parametre in menu manager help, with out any luck.
I can't get it to stop, and still show the children of the elements I choose to show before I stop the menu!

Can someone help me

Thanz in advance

Pfaff
Hi again

With your help I just solved my problem.

I read some new topics and I found out that this help:

I use the parametre: excludeprefix

Thank you so much

Regards Lena