Thursday, January 22, 2009

How to add Submenu with Item Template using MenuItemTemplate and SubMenuItemTemplate

Now, how do I add a Sub Item to my Main Menu's... check the below logic. Its fairly simple. So, I took the MainMenu on the Central Admin site and tweaked it little bit.

Open the Welcome.ascx file. I wouldnt recommend doing any modifications on this file because this is a 1 file location and all your sites underneath reflect the modifications you do. So, make a copy... name it as WelcomeNew.ascx file.

and Add these lines below... and see how it works for yourself.

<SharePoint:SubMenuTemplate ID="ID_NewMenuItem" runat="server"
Text="New Item">
<SharePoint:MenuItemTemplate runat="server" ID="ID_SilverLight"
MenuGroupId="100" Sequence="100"
<SharePoint:MenuItemTemplate runat="server" ID="ID_SharePoint"
MenuGroupId="100" Sequence="100"

No comments: