Important Notice from AspDotNetStorefront
It is with dismay that we report that we have been forced, through the action of hackers, to shut off write-access to this forum. We are keen to leave the wealth of material available to you for research. We have opened a new forum from which our community of users can seek help, support and advice from us and from each other. To post a new question to our community, please visit: http://forums.vortx.com
Results 1 to 3 of 3

Thread: Customising the <ComponentArt:Menu /> control

  1. #1
    dbsHarry is offline Junior Member
    Join Date
    Dec 2008
    Posts
    2

    Post Customising the <ComponentArt:Menu /> control

    Hi,

    I have spent about 45minutes reading threads on here and searching the manual but I cannot find any documentation about how to modify the <ComponentArt:Menu/> horizontal drop down menu.

    Could somebody give some information on this such as:
    • It seems that it loads its data from /skins/skin_0/menuData.xml but where does it get the rest of the information from? For example some entries have NavigateUrl but how is the Categories item mapped?
    • Where is the (!menu.Whatever!) defined?
    • Is it possible to use an xml package to create the exact structure I want at runtime?
    • Is there any documentation online that I have missed?

  2. #2
    sethian is offline Junior Member
    Join Date
    Feb 2009
    Posts
    2

    Default Same Question

    I am looking for the same information. I do not want a 'Categories' section displayed on my main menu, I want the 2nd level menu's displayed, which I can do from within the xml config file for the menu. However, I want to tap into how the 'Categories' menu is dynamically populated to pop my 2nd level menus with the 3rd level menus.

    Where can I find documentation of how and where the 'Categories' menu item is populated.

  3. #3
    DanV's Avatar
    DanV is offline Ursus arctos horribilis
    Join Date
    Apr 2006
    Posts
    1,568

    Default

    If you want to remove the categories or other entities from the componentart dropdown menu, you would just remove

    Code:
    <item Text="(!menu.Categories!)" LookId="TopItemLook" />
    line from the menudata.xml file. That would work for any of the entity menus.

    If you actually wanted to modify the content of the menus, you would need to hook the menu up to a new datasource in templatebase.cs. The PageMenu object takes an XML document (obviously) which we build dynamically off of entity helper data within templatebase. You could theoretically hook the menu up to any datasource you wanted, whether it is static or generated dynamically (an xml package would do, or C# 3.0 has some really nice new capabilities for programmatically working with XML).

    !menu.entityname! is simply a string resource, controllable via the admin site.