Solved

sqlsitemapprovider and multiple web.sitemap files

Posted on 2006-07-18
3
520 Views
Last Modified: 2008-01-16
Hello

In previous web projects I have had different web.sitemap files for different menus on my page (e.g. top menu and left hand nav).

I can't see any obvious way with the sqlsitemapprovider to emulate multiple web.sitemap fiels for different menus. Is there a ways i can create separate 'menus' with the sqlsitemapprovider?

Thanks a lot

andrea
0
Comment
Question by:andieje
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 27

Accepted Solution

by:
Sammy earned 500 total points
ID: 17135452
It's actually easy to create multiple sitemaps based on the menus you choose.
from MSDN
http://msdn2.microsoft.com/en-us/library/ms178426.aspx

<configuration>
  <!-- other configuration sections -->
  <system.web>
    <!-- other configuration sections -->
    <siteMap defaultProvider="XmlSiteMapProvider">
     <providers>
       <add
         name="Company1SiteMap"
         type="System.Web.XmlSiteMapProvider"
         siteMapFile="~/Company1/Company1.sitemap" />
       <add
         name="Company2SiteMap"
         type="System.Web.XmlSiteMapProvider"
         siteMapFile="~/Company2/Company2.sitemap" />
     </providers>
    </siteMap>
  </system.web>
</configuration>

HTH
0
 

Author Comment

by:andieje
ID: 17136680
Hi

I'm using SQLSiteMapProvider which stores he sitemap in a database and not an xml file.

Also, my understanding of teh above method os that only provider is active at a time so only one menu can be seen at at a time. Is that right?
0
 

Author Comment

by:andieje
ID: 17138954
Hi

I'm wrong - you can use multiple site map providers at the same time.

However, I still would like to know if i can emulate multiple sitemaps with sqlsitemapprovider

thanks
andrea
0

Featured Post

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Attackers love to prey on accounts that have privileges. Reducing privileged accounts and protecting privileged accounts therefore is paramount. Users, groups, and service accounts need to be protected to help protect the entire Active Directory …

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question