Technical support This forum is closed.
Version 1.x > Technical support > CMSMenu use with images View modes: 
User avatar
Member
Member
ahmed - 1/18/2006 11:31:08 PM
   
CMSMenu use with images
hello

i'm looking to use the CMSMenu control in combination with images. although there are plenty of examples using CSS styles to manage mouse over and mouse up appearance, is there anything out there that covers use with different images?

looking at the MenuControl property it seems that the best practice is to use an XML file with the various images listed in standard grammar. however, trying to bind to such an XML file produces an error : object reference not set.

has anyone solved this problem? is it obvious?

thanks!
ahmed

User avatar
Guest
admin - 1/19/2006 6:57:56 PM
   
Re: CMSMenu use with images
Hello,

Thank you for your message. Unfortunately, the CMSMenu control doesn't support images.

We plan to add this support in Kentico CMS 2.0.

Best Regards,

User avatar
Member
Member
mbuckley - 1/31/2006 5:53:02 AM
   
Re: CMSMenu use with images
I did an image version of the menu using css..If you'd like me to post that code let me know.

It's a bit of a hack, but it works well enough, and might get you through until they add support for it.

User avatar
Member
Member
ahmed - 1/31/2006 4:22:20 PM
   
Re: CMSMenu use with images
i did use the CMS Menu with images by accessing the MenuControl member directly via the code behind.

unfortunately, the MenuControl also has some limitations:

a) it generates a table as part of the HTML it produces. this is undesirable when you're using divs and CSS for layout
b) it does not provide support for onblur and onfocus events

i have since moved to a custom web control that has much cleaner HTML and supports all events.

thanks for the posted replies!
ahmed

User avatar
Member
Member
mikeee - 2/23/2006 6:21:19 PM
   
Re: CMSMenu use with images
please do post your css solution:)

User avatar
Guest
norashlea - 3/2/2006 10:08:27 AM
   
Re: CMSMenu use with images
Maybe you've already found the way to do this with CSS, but just to let you know how I do it. In all the .CMSMenuItem* and .CMSMenuHighlighted* classes, I just include:

background-image: url([imagename]);
background-repeat: no-repeat;

Regards,
Sharon.

User avatar
Member
Member
Heath Clouston - 3/6/2006 1:22:58 AM
   
Re: CMSMenu use with images
I'm also interested in the solution to this CSS problem.

I'm also having an issue with applying seperate styles to second level menus.

I've added this property (CSSPrefix="MainMenu;MainMenuSubMenu;MainMenuOtherLevels" ) to the header.ascx control on my page and have also updated the CSS file to reflect the Prefix name for example:

.MainMenuCMSMenu
.MainMenuCMSMenuItem

.MainMenuSubMenuCMSMenu
.MainMenuSubMenuCMSMenuItem

But have had no luck in getting the submenu CSS to stick. Also I've noticed that when I added the CSSPrefix and updated the CSS names accordingly, the 1st level menu dropped the styles too.

User avatar
Guest
admin - 3/6/2006 11:15:09 AM
   
Re: CMSMenu use with images
Hi Heath,

Thank you for your message. Could you please save the page in Internet Explorer on your disk (IE -> File -> Save as...) and send me the page together with the _files subfolder that contains the style and scripts to petr.palas@kentico.com?

Thank you.

Best Regards,

User avatar
Member
Member
Heath Clouston - 3/7/2006 1:39:29 AM
   
Re: CMSMenu use with images
Thanks Petr, will do!