At 10:15 AM 1/22/01 -0500, you wrote:

>I'd like to have a set of links at the top of my pages within an
>application that represent a trail to the user and how they could navigate
>backwards if needed. I'm wondering what standard and/or clever ways there
>are to go about this, and where the logic might go. For example, I've
>thought about the top of each page adding it's link as the user goes
>through, but this only works in the forward direction...
>
>Here's what I'm thinking it will look like when the user has made three
>choices and is on "confirm," which wouldn't be a hyperlink like the first
>three sections.
>
>Home\Data Entry Menu\Visit Entry\Confirm.
>
>(I.e.: Home\Layer1\Layer2\Layer3)
>
>I don't necessarily need code, just ideas from people who have done it!

The only way I've seen it done (although I did get the idea from a really 
expensive piece of development software) is managed partly in the database. 
So you've got a table that has all of the categories and it looks something 
like this:
CatID
CatName
ParentCat

So your data will go
1
siteroot
1

2
books
1

3
CDs
1

4
Health
1

5
Computer
2

6
Fiction
2

7
Science Fiction
6

etc.

Then in the template, since you have the category you are in, you can trace 
that category up to the root.

There are two issues with this:
1) remember to hide the root
2) if you ever assign something to more than one category you tend to get 
lost in the catalog structure.

So let's imagine that you put Cryptonomicon in the computer book section 
and the fiction section. You pass the product ID for Cryptonomicon. How do 
you determine which category the user used to get there? In the really 
expensive product that I got this idea from, this wasn't handled at all. 
The first category returned was the parent category and showed up in the 
breadcrumbs. To change this was a really big issue.

We are using something similar in a site we are working on and the 
product's parent is passed to the product template. But what happens if you 
want to assign a category to two different parent categories? You'll have 
to detect whether or not the parent is necessary or assume that it is 
always necessary. Enable session variables and pray, I guess. You probably 
don't want to pass variables in the url that show the directory structure 
all the way up to the root if your catalog structure is more than three 
levels deep.

It's a mess if things can get assigned to more than one parent. That's all 
there is to it.


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm

Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to