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

Help with multi level category navigation

P: n/a
Red
Hi,

Can someone give me some pointers on how to approach creating multi
level category navigation for a website?

Take ebay for example. No matter where you are, you have a navigation
bar telling you how you got there, and can click on these to go to any
of the parent levels;

Music > CDs > Folk > American

Im not looking for complete instructions how how to code this, but more
an overview of how something like this works. How do you build the
category <> parent category structure within your database.

Some pointers of what i need to be thinking about would be a great
start, or any links to web resources would be great. Ive tried
googling, but not sure of the terminolgy to use, so ive not found eactly
what i want yet.

Many TIA,
Red.
Apr 11 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
> Im not looking for complete instructions how how to code this, but more an
overview of how something like this works. How do you build the category
<> parent category structure within your database.

Well, as an alternative, if using mod rewrite, you could use paths
like: http:/example.com/music/cd//folk/american/ -- and then
simply parse them, and from there generate the breadcrumb trails.
--
best regards
Thomas Schulz
http://www.micro-sys.dk/products/sitemap-generator/
http://www.micro-sys.dk/products/website-analyzer/
Apr 11 '06 #2

P: n/a
Red wrote:
Can someone give me some pointers on how to approach creating multi
level category navigation for a website?
First of all, have a good structure. Only then worry about making it
navigable by added links.

Of course you may be refactoring an existing site structure that you
can't change, so do your best. But in general a site with a sensible
structure is easier to work with than trying to label up a bad one and
apply usability to it afterwards.

- Hierachies are good. Don't just leave every page as
"?id=1234567890", even if that is how your database code stores them.

- Predictable hierarchies are good hierarchies. Make your URL site
structure resemble the user's conceptual model of how they'd expect
things to be organised

- Default documents in directories are good. Hierarchies are much less
useful without them.

Read the usual usability texts, such as Joe Clark's (good book, scary
cover, free online too)
Take ebay for example. No matter where you are, you have a navigation
bar telling you how you got there, and can click on these to go to any
of the parent levels;

Music > CDs > Folk > American


Generally called "breadcrumbs". They're a good idea on anything
hierarchical, especially if your site implementation and URLs aren't,
but your users would like some hierarchical access to it.

Generally they're spat out of the same content database as the rest of
the pages, or else hand-edited for small sites.

You might also (if the site physical structure resembles the logical
structure) find it practical to auto-generate them with a simple script
that splits the URL up into directory segments.

Apr 12 '06 #3

P: n/a
On Tue, 11 Apr 2006 17:50:28 GMT Red <re*@red.com> wrote:

| Take ebay for example. No matter where you are, you have a navigation
| bar telling you how you got there, and can click on these to go to any
| of the parent levels;
|
| Music > CDs > Folk > American
|
| Im not looking for complete instructions how how to code this, but more
| an overview of how something like this works. How do you build the
| category <> parent category structure within your database.

I build such things hierarchically within a filesystem. I don't put
everything in a database. What goes in the database are things that
typically get elemental updates, or need fast searching (and in many
cases a hashed DB file works better anyway).

Still, you could do this in a relational database by keeping relations
such as hierarchy parent. You can find all the children of a given
record by accessing all records that have the parent record as its
parent relation. You might need to keep the parent column indexed to
do this effectively.

--
-----------------------------------------------------------------------------
| Phil Howard KA9WGN | http://linuxhomepage.com/ http://ham.org/ |
| (first name) at ipal.net | http://phil.ipal.org/ http://ka9wgn.ham.org/ |
-----------------------------------------------------------------------------
Apr 12 '06 #4

P: n/a
"Andy Dingley" <di*****@codesmiths.com> wrote in
news:11*********************@v46g2000cwv.googlegro ups.com:
Red wrote:
Take ebay for example. No matter where you are, you have a navigation
bar telling you how you got there, and can click on these to go to any
of the parent levels;

Music > CDs > Folk > American


Generally called "breadcrumbs". They're a good idea on anything
hierarchical, especially if your site implementation and URLs aren't,
but your users would like some hierarchical access to it.


Just to clear up a bit of sloppy thinking: despite its name, a "breadcrumb
trail" doesn't "tell you how you got there" (that's what browser history
does), it tells you where the page stands in the hierarchy. It would only
be "how you got there" *if* (and only if) you had entered the site at the
front page and "drilled down" to the specific page. The *entire* reason
for a breadcrumb trail is to accommodate readers who *didn't* do that
(usually because a search led them to the specific page).
May 2 '06 #5

P: n/a
On Tue, 2 May 2006, Eric Bohlman wrote:
Just to clear up a bit of sloppy thinking: despite its name, a "breadcrumb
trail" doesn't "tell you how you got there" (that's what browser history
does), it tells you where the page stands in the hierarchy. It would only
be "how you got there" *if* (and only if) you had entered the site at the
front page and "drilled down" to the specific page. The *entire* reason
for a breadcrumb trail is to accommodate readers who *didn't* do that
(usually because a search led them to the specific page).


Indeed.

However, it seems to me that any halfways-experienced webnaut, if they
lost their way, would try hacking the end off the URL, hierarchy by
hierarchy, to see what they got.

I'm becoming increasingly irritated by commercial sites which rudely
inform me "Directory listing denied" when one tries that. Sure! -
they have every right to deny a "directory listing" if they so choose,
but, for heaven's sake, they should do that by placing an
appropriately designed navigation page in its place (index.html or
default.asp or whatever their web server expects).

In fact, funnily enough, I find myself increasingly getting into the
habit of finding my way around vendors' sites by using google - and
ignoring the vendors' own attempts to keep me from getting a clear
overview of their content. There has to be some kind of message in
that.
May 2 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.