Use SharePoint designer to change the left-side navigation to Treeview

Source: Internet
Author: User
Based on the following Blog content, I use SharePoint designer to change the left-side navigation to Treeview.
How to create custom navigation menu in SharePoint with XML Data Source

1. generate an xmldatasource using the XML file mynavsource. xml and upload it to the document library of the SharePoint website. The content is as follows:

Mynavsource. xml
<? XML version = "1.0" encoding = "UTF-8" ?>
< Menu Name = "Mynavigation" >
< Folder Name = "Technical links" >
< Node Name = "Microsoft" URL = "Http://www.microsoft.com" > </ Node >
< Node Name = "Msdn" URL = "Http://www.msdn.com" > </ Node >
< Node Name = "Technet" URL = "Http://technet.microsoft.com" > </ Node >
</ Folder >
< Folder Name = "Links" >
< Node Name = "My blog" URL = "Http://blogs.msdn.com/matjazperpar" > </ Node >
< Node Name = "Microsoft Slovenia" URL = "Http://www.microsoft.com/slovenija" > </ Node >
</ Folder >
</ Menu >

 

2. Use SharePoint designer to open the website to be edited.
3. open the "Data Source library" task board and click "add an XML file..." under "XML files... ", select the uploaded XML file, and" mynavsource. XML ".

4. Open the defaule. Master File and find "contentplaceholder" with the ID "placeholderleftnavbar ". The cursor is positioned behind the H3 definition (after Code : < SharePoint: spxmldatasource Runat = "Server" ID = "Spxmlperformance1" >
< Datafileparameters >
< ASP: Parameter Name = "FILENAME" Defaultvalue = "Mynavsource. xml" />
< ASP: Parameter Name = "Filepath" Defaultvalue = "Document % 20 Library" />
</ Datafileparameters >
</ SharePoint: spxmldatasource >

5. Find SharePoint: aspmenu with the ID "quicklaunchmenu" and change it
<Asp: Treeview id = "quicklaunchmenu" performanceid = "spxmlperformance1" runat = "server" width = "124px">
6. Select this Treeview and open the common Treeview tasks dialog box. Click "Edit treenode databingdings..." to open the "Treeview databingdings Editor" dialog box.

7. add data binding for menu, folder, and node respectively. The data in the textfield attribute is name, and the data in the navigateurlfield attribute is URL (only available for node ). Click OK and save the master page.
8. When you browse the home page of the website, you will find that the left-side navigation of the home page has changed. Although it is ugly, it implements our functions. If you want to make it more beautiful, you need to correct its style.

It is worth noting that the page viewlsts. aspx linked by view all site conent does not use default. Master, so the page has not changed.

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.