simple menu

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"
Post Reply
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

simple menu

Post by manuel »

Hi cmsms-ers,

I'm running the latest cmsms 1.2.2 (fresh install)
I need to create a new menu that has a different structure then the examples included in the default install.
As I'm not a programmer, I can't seem to produce proper smarty code in order to get a working solution for my template problem.
I do believe however it should be a fairly simple task for some of the people reading this forum!

The goal:
To have a separate for every main item
the rest of the sub items can reside Inside the of the main item like a normal
A class or id should be linked to every menu depth. (cfr: code below: level1, level2, level3)

The reason:
I would like to put all main item next to each other with a simple float:left;
This configuration would allow a list of all pages to be shown at the top of the page.



1

1.1
1.2
1.3
1.4
1.5




2

2.1
2.2
2.3

2.3.1
2.3.2
2.3.3


2.4
2.5




I know this isn't exactly rocket science or even the proper way to handle menu's but you would be helping me out an awful lot! I have tried and tried but I just can't produce the working smarty code for this  :'(

Greetings,
Manuel
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: simple menu

Post by Dr.CSS »

An image or example would help...
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: simple menu

Post by manuel »

Hi Mark,

I'm exited about you replying to my post because in my previous dwellings trough this forum I encountered many of your posts and have learned a lot from them!

The general idea is to have one separate for every main item.

I have attached the image to this post.

A website using more or less the same approach (but it's built with tables in stead of ) is http://www.boventonen.nl/

Greetings,
Manuel
Attachments
support-request.jpg
Last edited by manuel on Tue Dec 18, 2007 1:52 pm, edited 1 time in total.
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: simple menu

Post by Dr.CSS »

MarkFresh

Re: simple menu

Post by MarkFresh »

I'm looking for the same thing and I think it is what's been asked about, by the looks of it you just change a css menu ID, class or parameter so that it's permanently showing. Where do you do that?

thanks

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

Re: simple menu

Post by manuel »

Dear Mark,

Yes, this configuration shows all the menu items but I see in the code that you are not using separate for every main item...

2 possible disadvantage of this method are that the text sometimes disappears underneath the other sub menu's and the width of the sub menu will expand underneath the next main item if that main item doesn't have it's own sub pages to show in the menu. (cfr. attached image)

These 2 problems wouldn't occur any more if every main item and it's sub pages where contained in a separate
Every separate would have the "float:left;" css code and the actual page content would have the "clear:left" css code to force it not to start at the right of the menu but below the menu.

Greetings,
Manuel
Attachments
support-request2.jpg
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: simple menu

Post by Dr.CSS »

This is a default menu CSS, cssmenu template, and I took out a couple of calls to make it show all the subpages...

just add
#primary-nav li:hover ul ul,
#primary-nav li.menuparenth ul ul ul,
for fourth level
*/
#primay-nav ul,            note the missing r
#primay-nav li:hover ul,

#primary-nav li:hover ul ul,
#primary-nav li.menuparenth ul,
#primary-nav li.menuparenth ul ul {
  display: none;
}

The subpages menu width is a controllable entity using this, which all subsequent levels will use also...

/* Set the width of the menu elements at second level. Leaving first level flexible. */
#primary-nav li li {
  width: 200px;
}

The other way to do this would be to set up a menu tag call for each section and it's children then line them up across the top...
User avatar
manuel
Power Poster
Power Poster
Posts: 354
Joined: Fri Nov 30, 2007 9:15 am

Re: simple menu

Post by manuel »

Dear Mark,

I can't see how the problems described in my previous posts will get fixed if the html code that's generating the menu doesn't change...

I believe it would be better to create a .tpl file (located in the "cmsms/modules/MenuManager/templates" directory) that generates a menu code similar to the html code in my first post...

Would you (or someone you know) be interested in writing this smarty .tpl code for me? (for a some $$ of course ;D )
Please PM me if you are interested...

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

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