Page 2 of 3
Re: Menu structur
Posted: Sun Jan 13, 2008 10:40 pm
by nivekiam
The look and feel of the simple navigation menu can be 100% controlled with CSS and it can degrade very gracefully. Perhaps you should just try it. I know you can get what you are looking for. The first example I posted can also be brought into working with CMSms, but it would take work. However, it is also list based and not table based.
Re: Menu structur
Posted: Sun Jan 13, 2008 11:25 pm
by Dr.CSS
OK well the 'Mains' could be menuparent in the Menu manager template so you can style it your way, look in another template to find the call, the cssmenu has this line in it that you could use to pick the parent out and style it...
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
And you can take the references to ul li out of it...
Re: Menu structur
Posted: Mon Jan 14, 2008 2:54 am
by lollipop27
But the main and subcategories come automatically as soon as you give the sub pages a parent page...
no?
And then you just style them as such...
Re: Menu structur
Posted: Mon Jan 14, 2008 5:26 am
by Dr.CSS
OK you may be looking for something like this, it has no ul li...
http://forum.cmsmadesimple.org/index.ph ... 489.0.html
Re: Menu structur
Posted: Mon Jan 14, 2008 9:15 am
by tcdk
mark wrote:
OK well the 'Mains' could be menuparent in the Menu manager template so you can style it your way, look in another template to find the call, the cssmenu has this line in it that you could use to pick the parent out and style it...
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
current == true}
haschildren == true}
type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
{else}
And you can take the references to ul li out of it...
Here you can only style "main" if it has "subs" ..
I have "mains" with no subs.
Isen't it possible to write out mains and subs completly apart?
What is the tag for write out "main" and "subs" ?
Re: Menu structur
Posted: Mon Jan 14, 2008 9:19 am
by tcdk
Look at the menu here at cmsmadesimple.org .. it's exactly like that one (not as dropdown ofcource)
But all the mains is with large types, and the subs are with small.. and there's a images under.
Re: Menu structur
Posted: Mon Jan 14, 2008 5:21 pm
by Dr.CSS
Those things are achieved with ul li unfortunately for you...
#primary-nav li {the style you want say, font-weight:bold; font-size:20px}
Second level...
#primary-nav li li {new style you want, font-weight:normal; font-size:12px}
And to keep only one submenu open use collapse="1" in the menu call...
Re: Menu structur
Posted: Tue Jan 15, 2008 9:44 am
by tcdk
Are there anyway to writeout submenues? Then I will make the menu in php with "cases"
Re: Menu structur
Posted: Thu Jan 17, 2008 2:07 pm
by tcdk
found out, that these lines in simple menu, "styles" the submenues:
Code: Select all
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<START TAG>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="<END TAG>" times=$node->prevdepth-$node->depth}
I've removed all classes, and set the "" tag style to the "main" category style.
Are the anyway where I can style in the "repeat" string? If I set in eg. "" it works, but if I try with it dosen't work.
Is it possible to change font size in subs?
Re: Menu structur
Posted: Thu Jan 17, 2008 4:01 pm
by tcdk
This is my menu btw:
Code: Select all
{* CSS classes used in this template:
.currentpage - The active/current page
.bullet_sectionheader - To style section header
hr.separator - To style the ruler for the separator *}
{if $count > 0}
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<b>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</b>" times=$node->prevdepth-$node->depth}
{elseif $node->index > 0}
{/if}
{if $node->current == true}
<br><a href="{$node->url}" {if $node->target ne ""} target="{$node->target}"{/if} > {$node->menutext} </a>
{elseif $node->parent == true && $node->depth == 1}
<a href="{$node->url}" {if $node->target ne ""} target="{$node->target}"{/if} > {$node->menutext} </a>
{elseif $node->type == 'sectionheader'}
{$node->menutext}
{elseif $node->type == 'separator'}
<hr class="separator" />
{else}
<br><a href="{$node->url}"{if $node->target ne ""} target="{$node->target}"{/if} > {$node->menutext} </a>
{/if}
{/foreach}
{repeat string="<br>" times=$node->depth-1}
{/if}
Re: Menu structur
Posted: Thu Jan 17, 2008 4:39 pm
by Dr.CSS
You could try using then it will be able to take a style...
Re: Menu structur
Posted: Thu Jan 17, 2008 9:08 pm
by tcdk
Like this?
Code: Select all
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string="<span><ul class='submenu'>" times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string="</ul></span>" times=$node->prevdepth-$node->depth}
That dosen't work.
This menu is giving me gray hairs!
Re: Menu structur
Posted: Fri Jan 18, 2008 3:09 am
by Dr.CSS
If you are willing to use ul li then use a default menu and it will give the ability to add your classes how you want...
What do you have against ul li, I was never quite sure what it was?...
Re: Menu structur
Posted: Fri Jan 18, 2008 9:23 am
by tcdk
If I can style away the li's I dosen't have anything against em
I just dosen't think the fit in to this site.
Re: Menu structur
Posted: Sat Jan 19, 2008 5:45 am
by Dr.CSS
If this "If I can style away the li's" means getting rid of the bullets that an ul li would most times have yes it's ul {list-style-type: none;} if you look at the CSS for a default menu, vertical for yours, there is a short list of calls, #primary-nav #primary-nav li etc., especially the ones that say don't mess with these unless you know what your doing that will give you a basis for starting yours, the others below it should mostly be for the styling that you can change to suit your needs...