Elxis CMS Forum

Extensions => Modules => Topic started by: balisto on September 15, 2008, 22:41:10

Title: Problems with menu module
Post by: balisto on September 15, 2008, 22:41:10

Hi,

today I write again about some menu problems I have.

1st question:

The official "Elxis Templat Guide" (PDF) states:

Quote
Elxis Team recommends the usage of the Flat List style for any menu and the usage of css suffixes to distinguish various menus appearance.

So if I change the Menu Style of mainmenu from "Vertical" to "Flat List" (as recommended) it doesn't show any sublevel-links. I thought it was a problem with my local installation, but if I change the Menu Style of mainmenu at http://www.elxis-demo.com/ the same happens: the sublevel-navigation of "Discover Elxis" disappears. I this a bug? Or did I misunderstand anything?

2nd question:

Another problem: If I link to a page from two menus at the same time (e.g. from topmenu and mainmenu), it doesn't show any sublinks neither (even not with vertical style chosen). This problem is also reproduceable in demo installation.

Any ideas or can it be confirmed that something goes wrong there?

Cheers,
Chris
Title: Re: Problems with menu module
Post by: balisto on September 16, 2008, 15:51:55
Just realized that I posted this into wrong category. Can be moved to "Modules" I guess.

Anyway, still looking foward to get an answer ;-)

Chris
Title: Re: Problems with menu module
Post by: babis1 on September 16, 2008, 18:57:54
if you use flat you must make a suffix for this menu p.e.
in css you have the parametr  ul.mainlevel li {display-inline;} and you want to give p.e. an fff color in that menu txt, go anywhere in css file write ul.mainlevel-new li {display-inline; color:#ffffff;} and then inside in menu parametrs in module suffix give that -new
Title: Re: Problems with menu module
Post by: datahell on September 16, 2008, 23:54:27
Answers to your questions.

1. No, it is not a bug. Each template has its own CSS file. In the sample "okto" template the main menu has been set to be displayed as vertical and the CSS has been set accordingly. In an other template someone might wanted a flat list menu or a sucker fish menu, the CSS would be totally different. The menu module has a number of parameters that changes the menu's html source code. When the html changes and there is no CSS code to support this change then the final result wont be good. In this case you should edit your template's css or set the menus parameters to those that matches the template style.

2. The solution to this problem is to enable the Itemid preload feature (setsyn) in the menu module parameters. SetSyn uses AJAX (prototype) to pre-load the id of the clicked menu item and save it to a session variable before the visitor goes to the requested page (this is a unique Elxis idea). It is like Elxis going to the requested page before your browser! You should also be careful how to set up your menus. For some people might be important which menu item has been clicked, for others not. So this feature is disabled by default.
Title: Re: Problems with menu module
Post by: balisto on October 20, 2008, 23:31:11
Hi,

thanks for your answer.

1) I'm not sure I got this...
If I select menu style "vertical" I get the following HTML output:

Quote
<div class="moduletable">
<a href="http://www.myserver.com/test/news/" title="News" class="mainlevel" id="active_menu" onclick="setsynitem('89', this.href); return false;">News</a>
<div style="padding-left: 4px" class="sublevel1"><img src="http://www.myserver.com/test/templates/test/images/indent1.png" alt="indent1" /><a href="http://www.myserver.com/test/news/medias/" title="Medias" class="sublevel" onclick="setsynitem('90', this.href); return false;">Medias</a></div>
<div style="padding-left: 4px" class="sublevel1"><img src="http://www.myserver.com/test/templates/test/images/indent1.png" alt="indent1" /><a href="http://www.myserver.com/test/news/latest-news/" title="Latest news" class="sublevel" onclick="setsynitem('91', this.href); return false;">Latest News</a></div>
</div>

If I select menu style "flat list" I only get the following HTML output

Quote
<div class="moduletable">
<ul id="mainlevel208" class="mainlevel">
<li><a href="http://www.myserver.com/test/news/" title="News" class="mainlevel" id="active_menu" onclick="setsynitem('89', this.href); return false;">News</a></li>
</ul>
</div>

How does it make sense to change styles of something in CSS that is not even shown in HTML-output!? Help!

2) Good to know about this feature. It works!

Cheers,
Chris
Title: Re: Problems with menu module
Post by: balisto on October 21, 2008, 13:28:55

Ok, I was a bit quick with point 2)

It does work now, but only for the mainmenu (left) - if I click  on a topmenu item it doesn't show the sublevel items of the same item in the left mainmenu. What I actually want to achieve is exactly the same as here: http://www.elxis-downloads.com/ so that the main sections of the website appear in the topmenu as well es in the mainmenu and that the sublevel items show up no matter if I click on the section item in the mainmenu or in the topmenu...

Anybody can help me to understand what I'm doing wrong?

Cheers,
Chris

Title: Re: Problems with menu module
Post by: balisto on October 23, 2008, 22:51:14
Hi, can anybody help with my 2 posts above?

Chris
Title: Re: Problems with menu module
Post by: datahell on October 23, 2008, 23:41:53
If you are online join Elxis Live ( http://www.elxis-chat.com (http://www.elxis-chat.com) )
Title: Re: Problems with menu module
Post by: pavel on January 27, 2009, 17:21:03
Hi Balisto,

I am struggling with the same problem - display of flat lists vs display of vertical list.  Did you find any solution to this?

Actually, I would prefer to see the following results, not sure it is possible in Elxis.  :(

<ul id="menu">
  <li class="menu">Sub 1
    <ul>
      <li>test 1</li>
      <li>test 2</li>
      <li>test 3</li>
      <li>test 4</li>
    </ul>
  </li>
  <li class="menu">Sub 2
    <ul>
      <li>test 1</li>
      <li>test 2</li>
      <li>test 3</li>
      <li>test 4</li>
    </ul>
  </li>
</ul>
Title: Re: Problems with menu module
Post by: ks-net on January 27, 2009, 17:25:13
if you interested in vertical menu with sublevels ... then use menu type= vertical

in flat-list elxis don't prints sublevels in code.