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

SiteMapPath control doesn't like named anchors in sitemap

P: n/a
Hi.

I'm using VS2005 Pro to work on a website project for my company.

The site has several navigation elements, all based on the standard VS2005
navigation components.

I have high-level section navigation provided via a horizontal menu, a
SiteMapPath to provide a breadcrumb and a vertical menu component on the
left edge.

The SiteMapPath uses a sitemap that covers the full site. The top menu uses
a smaller sitemap file to specify section headings. The side menus are
changeable via the use of a set of separate sitemap files, as our website is
broken up into sub-project folders using the WAP add-in and nested master
pages. Each section gets its own sub-sitemap.

The combination allows for the side (sub) menu to change depending on where
in the site the visitor is in the site. This system works great - until I
was asked to provide a menu that displays several links that target the same
page.

As you'll know if you'e used sitemap files, they do not allow two entries
that point to the same address. My solution to this has been to add named
anchor tags to the target pages and then add the "#anchorname" combination
to the url in the sitemap file.

This then correctly parses and allows for the menu to work as desired by my
project stakeholder, but it has the negative impact of not being interpreted
by the SiteMapPath (breadcrumb) control, which behaves as if the node was
not entered at all and blanks the control completely.

It also prevents the Selected page style of the side menu operating, so
other than the actual page content, I lose any navigational indicator to
present the current location to the user.

Has anyone come across this problem and found, or know of, a solution?

Thanks.

Al
Oct 18 '06 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Just as a follow-up, I have a work around that at least gets the SiteMapPath
working, though it can't be sued on the sub-menu.

Because the page the named anchors target is the same, I am able to cut the
node entries down in the full sitemap to just the page without the #name
suffix (again, no duplicates). This permits the breadcrumb to correctly
interpret where it is in relation to the sitemap and the page being viewed.

I guess I can live without the side menu selected page being highlighted,
given the breadcrumb now operates.

Would still appreciate any responses on how the use of named anchors might
be made to be recognised though!

Al

"Alec MacLean" <al**********@NO-SPAM-copeohs.comwrote in message
news:eq**************@TK2MSFTNGP05.phx.gbl...
Hi.

I'm using VS2005 Pro to work on a website project for my company.

The site has several navigation elements, all based on the standard VS2005
navigation components.

I have high-level section navigation provided via a horizontal menu, a
SiteMapPath to provide a breadcrumb and a vertical menu component on the
left edge.

The SiteMapPath uses a sitemap that covers the full site. The top menu
uses a smaller sitemap file to specify section headings. The side menus
are changeable via the use of a set of separate sitemap files, as our
website is broken up into sub-project folders using the WAP add-in and
nested master pages. Each section gets its own sub-sitemap.

The combination allows for the side (sub) menu to change depending on
where in the site the visitor is in the site. This system works great -
until I was asked to provide a menu that displays several links that
target the same page.

As you'll know if you'e used sitemap files, they do not allow two entries
that point to the same address. My solution to this has been to add named
anchor tags to the target pages and then add the "#anchorname" combination
to the url in the sitemap file.

This then correctly parses and allows for the menu to work as desired by
my project stakeholder, but it has the negative impact of not being
interpreted by the SiteMapPath (breadcrumb) control, which behaves as if
the node was not entered at all and blanks the control completely.

It also prevents the Selected page style of the side menu operating, so
other than the actual page content, I lose any navigational indicator to
present the current location to the user.

Has anyone come across this problem and found, or know of, a solution?

Thanks.

Al

Oct 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.