By using Microsoft. Sharepoint. webcontrols. delegatecontrol, you can specify a custom
Data Source Control. The data source is provided for Quick Start By passing to the delegate control. Data can be from a database or Code . This type of customization does not change the display side of the link.
.
You can replace the default Nodes Displayed in Quick Start by replacing the data source provided by the delegate function.
The following example shows the default data source declared in default. Master, where the value of the specified controlid is Quicklaunchdatasource . < SharePoint: delegatecontrol Runat = "Server"
Controlid = "Quicklaunchdatasource"
Scope = "Web" >
< ASP: sitemapdatasource
Sitemapprovider = "Spquicklaunchprovider"
Showstartingnode = "False"
ID = "Quicklaunchsitemap"
Runat = "Server"
/>
</ SharePoint: delegatecontrol >
We can create a feature to overwrite the default delegate. Create a folder in the \ template \ features directory to specify a replacement data source.
First, create the feature. xml file to reference the elements required by the feature, including the DLL components used by the data source and other XML files (navigationsitesettings. XML ). < Feature ID = "541f5f57-c847-4e16-b59a-b31e90e6f9ea"
Title = "Portal left navigation"
Description = "Enable portal navigation for the left navigation bar ."
Version = "12.0.0.0"
Scope = "Web"
Receiverassembly = "Microsoft. Sharepoint. Publishing, version = 12.0.0.0, culture = neutral, publickeytoken = 71e9bce111e9429c"
Receiverclass = "Microsoft. Sharepoint. Publishing. navigationfeaturehandler"
Xmlns = "Http://schemas.microsoft.com/sharepoint" >
< Elementmanifests >
< Elementmanifest Location = "Navigationsitesettings. xml" />
</ Elementmanifests >
</ Feature >
The following is navigationsitesettings. xml. This file redefines the site map provider as the quicklaunchdatasource control and sets the sequence attribute value to 50 to replace the default left-side navigation node.
(Note: The sequence value must be lower than the value of the control previously passed to the delegate to replace the original control)
< Elements Xmlns = "Http://schemas.microsoft.com/sharepoint" >
< Control ID = "Quicklaunchdatasource" Sequence = "50"
Controlclass = "System. Web. UI. webcontrols. sitemapdatasource"
Controlassembly = "System. Web, version = 2.0.3600.0, culture = neutral, publickeytoken = b03f5f7f11d50a3a" >
< Property Name = "Sitemapprovider" > Areasandpagessitemapprovider </ Property >
< Property Name = "Enableviewstate" > True </ Property >
< Property Name = "Startfromcurrentnode" > True </ Property >
< Property Name = "Startingnodeoffset" > 0 </ Property >
< Property Name = "Showstartingnode" > False </ Property >
< Property Name = "ID" > Qlsitemap </ Property >
</ Control >
< Hidecustomaction
ID = "Quicklaunch"
Hideactionid = "Quicklaunch"
Groupid = "Customization"
Location = "Microsoft. Sharepoint. sitesettings" />
</Elements>