Make sitemap dependent on master page

M

mike

I'm using ASP.NET 2.0 and IIS 6

I've got a business with 2 sites requiring separate intranet info.
Currently, I have 2 separate intranet sites set up in IIS. This leads
to having to double up on shared pages which I'd rather not have. Both
sites use a master page and a Menu control bound to a SiteMap.

When a user loads the intranet home page, I want the appropriate Master
Page to load. As both sites are on different subnets, I can detect the
site through Request.UserHostAddress and deliver the appropriate Master
Page.

My question is whether I can maintain 2 separate SiteMap files in the
one web site and associate one with each Master Page or will ASP.NET
crack it?
 
G

Guest

You canot do this using the SiteMapDataSource control because you cannot
specify which XML file it uses for it's data, it has to use web.sitemap.
However the menu control can use any XML data source, not just the
SiteMapDataSource control, so you could for example use a different
XMLDataSource control in each master page and point that at whatever Site Map
XML file you want. I have even seen an SQL based site map datasource control
that someone created.
 
M

mike

Yeah, I saw something a little while ago about a SQL based sitemap.
This might be a viable solution. I asked a question a little while ago
about selecting to display only parts of the sitemap but it sounded
like I'd have to create a custom class to handle it. My thought was to
configure the sitemap file something like this:

<sitemap>
<site1>
<sitemapnode />
....
</site1>
<site2>
<sitemapnode />
...
</site2>
</sitemap>

I think MS are on a good thing with this stuff but SiteMaps don't
support multiple site intranets. Maybe in the next version of ASP.NET...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top