To add contrast, custom links to be added to the site directly to its creation, we insert the definition in the configuration file (Onet.xml) of the site definition that we choose to change or we have created. Simply insert a new element "NavBar" under the "Project / NavBars", to add elements to the site. The NavBar element represents the header of a group of links, each defined by a single element "NavBarLink.
Code:
<NavBar Name = "Peppe links" ID = "1028">
<NavBarLink Name = "DotNet.it" url = "http://www.dotnet.it" />
<NavBarLink Name = "Trophy.net" url = "http://www.trophy.net" />
</ NavBar>
The ID of each new element type NavBar, must be greater than 1027, which is the last value used for items in the quick launch bar present by default.
In the above example, we created a new set of links, with a header and sub-elements. But nothing prevents us to directly insert a single element that represents NavBar itself a link to another page.
Code:
<NavBar Name = "DotNet.it" url = "http://www.dotnet.it" ID = "1029" />
NB: It 's important to remember that to see these changes applied to a site definition, you need a IISRESET the machine and creating a site from scratch.
Bookmarks