Wss3sdk: Configure and navigate to use custom data sources

Source: Internet
Author: User
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>


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.