Site Map Overview

Source: Internet
Author: User
A site map is a standard XML file with the extension. sitemap. It defines the structure of the entire site, links to various pages, related descriptions, and other related definitions. The document structure of a site map consists of multiple node elements at different levels. The file contains a root node sitemap, which contains multiple sitemapnode byte points under the root node, the sitemapnode node contains the following attributes:

Name

Description

URL

Set the URL address used for node navigation. This attribute value must be unique in the whole site map file.

Title

Set the node name.

Description

Set the description of the node.

Keyword

Defines the keywords that indicate the current node.

Roles

Defines the role set that allows you to view the map file of the site. Multiple roles can be separated by (;) and.

Sitemapfile

Set the site map file that contains other related sitemapnode elements.

Provider

Define the site navigation for processing other Site Map FilesProgramName. The default value is xmlsitemapprovider.

Site Map example
<? XML version = "1.0" encoding = "UTF-8" ?>
< Sitemap >
< Sitemapnode Title = "Homepage" URL = "Default. aspx" >
< Sitemapnode Title = "Computer books" URL = "Sitemapsa. aspx" >
< Sitemapnode Title = "Programming Language" URL = "Sitemapsa1.aspx"   />
< Sitemapnode Title = "Network application" URL = "Sitemapsa2.aspx"   />
< Sitemapnode Title = "Office software" URL = "Sitemapsa3.aspx"   />
</ Sitemapnode >
< Sitemapnode Title = "Human books" URL = "Sitemapsb. aspx" >
< Sitemapnode Title = "History" URL = "Sitemapsb4.aspx" >
< Sitemapnode Title = "Modern History" URL = "Sitemapsb4a. aspx"   />
< Sitemapnode Title = "Modern History" URL = "Sitemapsb4b. aspx"   />
</ Sitemapnode >
< Sitemapnode Title = "Economic" URL = "Sitemapsb5.aspx"   />
< Sitemapnode Title = "Education" URL = "Sitemapsb6.aspx"   />
</ Sitemapnode >
< Sitemapnode Title = "Natural science books" URL = "Sitemapsc. aspx"   />
</ Sitemapnode >
</ Sitemap >

Configure multiple site maps and site map providers
If you want to configure multiple site maps and site map providers on one site,To be modifiedWeb. configFile,RequiredAddProperty to add the custom site map providerWeb. configFile<System. Web>Node.You can also set a site map provider as the default site map provider.
See the following Web. config Two Xmlsitemapprovider, They are Defaultsitemap And Adminsitemap. Where Defaultsitemap Is set as the default site map provider.Web. config
< System . Web >
< Sitemap Defaultprovider = "Defaultsitemap" >
< Providers >
< Add
Name = "Defaultsitemap"
Type = "System. Web. xmlsitemapprovider"
Sitemapfile = "~ /Web. sitemap" />

< Add
Name = "Adminsitemap"
Type = "System. Web. xmlsitemapprovider"
Sitemapfile = "~ /Admin/Web. sitemap" />
</ Providers >
</ Sitemap >
</ System. Web >

they are the default site map providers and the site map providers in the management folder .
you can use the map providers of the sites. :
sitemapprovider of sitemappath is omitted , it uses the default site map provider.
use adminsitemap site map providers

of course, , other navigation controls, such as menu and Treeview , can be used similarly.

Related Article

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.