Solved

sqlsitemapprovider and multiple web.sitemap files

Posted on 2006-07-18
3
503 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
  • 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

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…
In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

786 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