Breadcrumb / Footprint Example
I'm trying to come up with a breadcrumb type system in ASP.Net to make it easier for users to navigate.
I've found an example online that uses a session to store each new page element as it's clicked on, but this relies on users following a route through the site ie from Home Page clicking a link to Clients, then clicking a link to View Client etc.
I also want to allow for them typing a URL or clicking on a cached link in the address bar.
So, my thinking is to possibly use an XML file that stores the hierarchy of pages. Something like:-
Code:
<document page="index.aspx" text="Home Page">
<document page="clients.aspx" text="Clients">
<document page="client_view.aspx" text="Client Details>
<document page="client_view_additional.aspx" text="Additional Details"></document>
<document page="policies.aspx" text="Policies>
<document page="policy_view.aspx" text="View Policy"></document>
</document>
</document>
</document>
</document>
So, if a user navigated straight to client_view.aspx then the site would know the hierarchy for the breadcrumb.
I haven't done a huge amount of work with XML before, so, firstly, would this concept work? How would you do a search in an XML file for the respective page to then find the hierarchy?
And secondly, would it be possible to add querystrings onto the end of the page variable when building the breadcrumb link. For example the actual link back to a client would be client_view.aspx?ref=1, so could I get the page detail from the XML file and then append the ref detail on the end?
Or does anyone know of a better way to build this type of thing?
Thanks
richyrich, September 24th, 2008 11:58 AM
Bookmarks