By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
448,470 Members | 970 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 448,470 IT Pros & Developers. It's quick & easy.

Sitemap & duplicate URL's

P: n/a
Does anyone know a way to allow duplicate URL's in a sitemap?

Here's my problem:

I'm designing (almost done) an online store with the following navigational
structure:

Home / Department / product listing / product detail.

Each department and product listing have unique pages but the product detail
is a single page that is given a product ID parameter in the query string.

All pages are derived from a master page which has the siteMapPath control.

What I can't do is link from the product listing page to the product detail
page and show in the siteMapPath were the user has come from i.e.:

Home / Department / Product list /product detail

I’m aware that the default sitemap provider won’t allow duplicate URL’s.

I’d be grateful for some advice!

Apr 22 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
You can allow a duplicate URL if you append a querystring parameter to the
end. It can be a dummy querystring parameter that doesn't do anything.
For example, the sitemap will see these as two separate pages:
Default.aspx
Default.aspx?dummy=1

--
I hope this helps,
Steve C. Orr,
MCSD, MVP, CSM, ASPInsider
http://SteveOrr.net

"James Page" <Ja*******@discussions.microsoft.comwrote in message
news:CB**********************************@microsof t.com...
Does anyone know a way to allow duplicate URL's in a sitemap?

Here's my problem:

I'm designing (almost done) an online store with the following
navigational
structure:

Home / Department / product listing / product detail.

Each department and product listing have unique pages but the product
detail
is a single page that is given a product ID parameter in the query string.

All pages are derived from a master page which has the siteMapPath
control.

What I can't do is link from the product listing page to the product
detail
page and show in the siteMapPath were the user has come from i.e.:

Home / Department / Product list /product detail

I’m aware that the default sitemap provider won’t allow duplicate URL’s.

I’d be grateful for some advice!
Apr 23 '07 #2

P: n/a
Steve C. Orr [MCSD, MVP, CSM, ASP Insider] wrote:
You can allow a duplicate URL if you append a querystring parameter to
the end. It can be a dummy querystring parameter that doesn't do anything.
For example, the sitemap will see these as two separate pages:
Default.aspx
Default.aspx?dummy=1
Thanks Steve but there'e a problem with this work around

Say I've got the following pages:

Default.aspx, page1.aspx, page2,aspx & page3.aspx

The structure is that the default.aspx links to pages 1 & 2.aspx
Pages1 & 2 link to page3.aspx.

The sitemap =

<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >

<siteMapNode url="~/default.aspx" title="Default" >
<siteMapNode url="~/page1.aspx" title="Page1">
<siteMapNode url="~/page3.aspx" title="Page 3" />
</siteMapNode>
<siteMapNode url="~/page2.aspx" title="Page2" >
<siteMapNode url="~/page3.aspx?id=2" title="Page 3" />
</siteMapNode>
</siteMapNode>
</siteMap>

A master page holds the siteMapPath.

All works fine when you link to page3 from page1 and the siteMapPath
looks like: default : Page 1 : Page 3

However when you link from page2 to page 3 the siteMapPath renders the
same as linking from page1 !

Also if you amend the first instance of page3.aspx to page3.aspx?id=1
the siteMapPath won't render at all!

I've tried all sorts of different combinations without success.

Thanks

James
Apr 24 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.