Tuesday, February 17, 2009

Creating navbar links from site definition

Scenario:
We were working on a small assignment to create a Help Desk application. And while writing the site definition we wanted to add Quick Nav Menus.

Solution:
This solution came from my student Vasu.
You can use NavBars and NavBarLink tags to add quick launch links.

Code:

<NavBar Name="HelpDesk"
Separator="&nbsp;&nbsp;&nbsp;"
Body="<a ID='onetleftnavbar#LABEL_ID#'
href='#URL#' accesskey='H' >#LABEL#</a>" Url="#" ID="1100">

<NavBarLink Name="Open new Ticket"
Url="Lists/TicketContact/NewForm.aspx">
</NavBarLink>
<NavBarLink Name="All Tickets"
Url="Lists/TicketContact/AllItems.aspx">
</NavBarLink>
</NavBar>

0 comments: