Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Breadcrumbs?

LEGEND ,
Jun 06, 2007 Jun 06, 2007
How are most of you implementing a "breadcrumb" menu. It's stright
forward with static content but what's the best strategy with database
content where different categories of content share the same page? I've
tried using cookies and that seems to create more complicated problems.
TOPICS
Server side applications
405
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2007 Jun 07, 2007
> How are most of you implementing a "breadcrumb" menu. It's stright forward
> with static content but what's the best strategy with database content
> where different categories of content share the same page? I've tried
> using cookies and that seems to create more complicated problems.

There probably isn't one answer fits all to this, but on dynamic sites, I
tend to store the site navigation as XML. I can then use a bit of XSL to
grab the current page node, and then walk up the chain to grab each
subsequent parent page and spit that out as a UL for the breadcrumbs.

-Darrel


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2007 Jun 07, 2007
Thanks for responding. I am intrigued by your method. It's probably more
than you want to comment on but how did you store site nav as xml?
Consequently, do you have any links/tutorials that you think might help.

I'll try doing a google on breadcrumbs and xml.

darrel wrote:
>> How are most of you implementing a "breadcrumb" menu. It's stright forward
>> with static content but what's the best strategy with database content
>> where different categories of content share the same page? I've tried
>> using cookies and that seems to create more complicated problems.
>
> There probably isn't one answer fits all to this, but on dynamic sites, I
> tend to store the site navigation as XML. I can then use a bit of XSL to
> grab the current page node, and then walk up the chain to grab each
> subsequent parent page and spit that out as a UL for the breadcrumbs.
>
> -Darrel
>
>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2007 Jun 07, 2007
do you have your database write out the xml?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2007 Jun 07, 2007
> Thanks for responding. I am intrigued by your method. It's probably more
> than you want to comment on but how did you store site nav as xml?
> Consequently, do you have any links/tutorials that you think might help.

You could just create your own XML file. Alternatively, what we do is have
our CMS create the XML for us. We then store it in the DB.

> I'll try doing a google on breadcrumbs and xml.

Yea, I can't think of any specific tutorials for you, but XML is ideal for
storing site navigation since it's hierarchacal by default.

-Darrel


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Jun 07, 2007 Jun 07, 2007
LATEST
I got something to work. It's actually pretty nice but it pulls in the
product and stores that in a temp xml file.

I'm pulling in the cid which is good for the url but not very good for
people who remember the product description or the page they were on.
The <%= writeBreadCrumb(strCrumbTitle) %> is just pulling in the cid but
I want it to pull in something more meaningful. How would I pass
multiple querystrings at the same time? I think this way I could pass a
better description along. I tried this but wasn't able to pass anything.
Got an error on the other end.

<%
dim strCategory
dim strCrumbTitle

'determine what category is requested
strCategory = request.queryString("cid")

'Use the category name as title for the crumb
strCrumbTitle = strCategory
%><%= writeBreadCrumb(strCrumbTitle) %>
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines