Design and CSS styles
Version 3.x > Design and CSS styles > CMSListMenu CSS Classes View modes: 
User avatar
Member
Member
MarchesaniR - 6/5/2009 8:32:36 AM
   
CMSListMenu CSS Classes
Hello everyone,
I'm trying to use CMSListMenu to create a CSS Menu that shows a dropline menu instead of the default one (i'd like to seem submenu items side by side instead that one under the other like This menu.
I tried everything but I cannot handle to find a way to set the correct classes in the right place. I think there are too many.
Someone else has made this type of navigation menu?
It's possible to use standard menu css in CMSListMenu?

Thanks in advance for any help
PS: I got v4 kentico, but I think that this feature is the same in v3

User avatar
Member
Member
MarchesaniR - 6/5/2009 10:10:41 AM
   
RE:CMSListMenu CSS Classes
Hello,
I noticed that Kentico treats the whole menu as a single div, while most of the dropline menus, in order to work, creates a single div for every menu section, I think this might be my issue.
Please find attached a sample of the same menu as should be written and how kentico designs it. If I try to run kentico one in a page, it becomes a mess.

RIGHT ONE
<div class="nav">
<div class="table">

<ul class="select"><li class="select"><a href="#nogo"><b>Home</b>
</a></li></ul>

<ul class="select"><li><a href="#nogo"><b>Tab 1</b><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<div class="select_sub">
<ul class="sub">
<li><a href="#nogo">1</a></li>
<li><a href="#nogo">2</a></li>
<li><a href="#nogo">3</a></li>
<li><a href="#nogo">4</a></li>
</ul>
</div>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>

<ul class="select"><li><a href="#nogo"><b>Tab 2</b><!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
<div class="select_sub show">
<ul class="sub">
<li><a href="#nogo">A</a></li>
<li><a href="#nogo">B</a></li>
<li><a href="#nogo">C</a></li>
<li><a href="#nogo">D</a></li>
</ul>
</div>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>
</ul>
</div>
</div>


WRONG ONE (How Kentico designs it)


<div class="nav">
<div class="table">

<ul class="select"><li class="select"><a href="#nogo"><b>Home</b>
</a>
</li>
</ul>
<ul class="select">
<li><a href="#nogo"><b>Tab1</b></a>
<ul class="sub">
<li><a href="#nogo">a</a></li>
<li><a href="#nogo">b</a></li>
<li><a href="#nogo">c</a></li>
<li><a href="#nogo">d</a></li>
</ul>
</li>
</ul>
<ul class="select">
<li><a href="#nogo"><b>Tab 2</b></a>
<ul class="sub">
<li><a href="#nogo">a</a></li>
<li><a href="#nogo">b</a></li>
<li><a href="#nogo">c</a></li>
<li><a href="#nogo">d</a></li>
<li><a href="#nogo">e</a></li>
</ul>
</li>
</ul>
</div>
</div>


There is a way to let Kentico work in the right way?
Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 6/24/2009 7:54:32 AM
   
RE:CMSListMenu CSS Classes
Hi,

I am sorry for the inconvenience but there are only two options:

1) You can use the RenderedHTML property in that web part and modify the rendered HTML code.

2) You can create custom menu using CMS.TreeEngine.TreeNode where you will get the data set of the nodes and then you can generate the HTML according to your needs.

Best Regards,
Juraj Ondrus

User avatar
Member
Member
john-squareroot-inc - 10/21/2009 11:20:54 AM
   
RE:CMSListMenu CSS Classes
It doesn't appear that the RenderedHTML property exists in the 4.1 cmslistmenu.ascx.cs file anymore. Is this true?

User avatar
Kentico Developer
Kentico Developer
kentico_martind - 10/22/2009 4:04:46 AM
   
RE:CMSListMenu CSS Classes
Hello,

The property still exists. Could you please use following sample code to reference it e.g. in OnContentLoaded method:

this.menuElem.RenderedHTML

Best Regards,

Martin Dobsicek