Technical support This forum is closed.
Version 1.x > Technical support > CMSMenu - controlling/styling the drop-down View modes: 
User avatar
Guest
norashlea - 2/19/2006 11:28:08 PM
   
CMSMenu - controlling/styling the drop-down
Can you tell me how I can specify the "drop-down" behaviour of CMSMenu? ie, can I specify drop-UP instead of the default drop-DOWN for sub-menus?

Also, is it possible to have completely separate styling for two different CMSMenu controls? I've got a CMSMenu control on my default page, with default behaviour and styling (.CMSMenu in main.css), and I've created a user-control that has another CMSMenu control, created a set of classes .LowerCMSMenu in main.css based on .CMSMenu and then styled the way I want, but some of the style attributes in .LowerCMSMenu* are being ignored. eg, the border. I have specified no borders at all in .LowerCMSMenu*, but the control continues to take the border style that is set in .CMSMenu*, even though all the other attributes set in .LowerCMSMenu* are displaying correctly.

Thanks,
Regards,
Sharon.

User avatar
Guest
admin - 2/20/2006 9:15:11 AM
   
Re: CMSMenu - controlling/styling the drop-down
Hi Sharon,

Yes, it's possible to open the CMSMenu upwards. You only need to use a modified script skmMenu.js, save it as skmMenuUp.js and set the CMSMenu.ExternalScriptPath property value to "~/scripts/skmMenuUp.js".
You can download the file from http://www.kentico.com/downloads/skmmenuup.zip.

Regarding different CSS styles: Could you please save the rendered page and send me the HTML code?

Thank you.

Best Regards,

User avatar
Guest
norashlea - 2/20/2006 9:04:36 PM
   
Re: CMSMenu - controlling/styling the drop-down
Hi Petr,

I've emailed you a html of the rendered page.

I think I've done something wrong, though, with the CMSMenu control on the user control. I've added the skmmenuup.js to the scripts folder, and modified the peoperty, but the dropdown continues to drop down instead of up.

Also, if I set CssClass to LowerCMSMenu, all the styles are ignored and the control takes the default styles of CMSMenu. If I have nothing set for CssClass and set CssPrefix to Lower, I get all the styles I want EXCEPT the borders and the dropdown behaviour.

These are the properties I have set for the CMSMenu control on my user control -- the one that I want different styles for:

<cc1:cmsmenu
id=CMSMenu1 layout="Horizontal"
selectnodespath="/%"
runat="server"
CSSPrefix="Lower"
selectnodespathtype="AliasPath"
cursor="Default"
externalscriptpath="scripts\skmmenuup.js"
selectnodesmaxrelativelevel="-1"
borderstyle="None">
</cc1:cmsmenu>

User avatar
Guest
admin - 2/21/2006 5:27:01 PM
   
Re: CMSMenu - controlling/styling the drop-down
Hi Sharon,

could you please try to use the following control properties:

<cc1:CMSMenu
id="CMSMenu1"
runat="server"
Layout="Horizontal"
SelectNodesPath="/%"
SelectNodesPathType="AliasPath"
Cursor="Pointer"
ExternalScriptPath="~/scripts/skmmenuup.js"
SelectNodesMaxRelativeLevel="-1">
</cc1:CMSMenu>

Please let me know if it works.

Best Regards,

User avatar
Guest
norashlea - 2/21/2006 6:01:22 PM
   
Re: CMSMenu - controlling/styling the drop-down
It hasn't made any difference, Petr. Have tried the ExternalScriptPath as both exactly as you have it noted, as well as '<%=ResolveUrl("~/scripts/skmmenuup.js")%>'

Regards,
Sharon.