473,385 Members | 1,693 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Help with multi level category navigation

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
5 2252
> 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
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
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
"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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: CW | last post by:
I have been using (vertical) data list to simulate menus on left pane of pages (I don't use drop-down and pull-down menus because javascript must be enabled). However, the problem with data list is...
0
by: Brian | last post by:
Thanks for your time. I'm interested in building a collapseable/multi-level/Xml based navigation control from scratch. My goal is something similar to Telerik's rad...
0
by: Darren Carter | last post by:
I am trying to figure out how to create a static menu on a master page that has the top level navigation in a horizontal layout, and the corresponding second level of navigation on another...
4
by: snowweb | last post by:
I am trying to implement a CSS hierarchical unfolding menu on a site. The thing is, it needs to be dynamically populated from the results of a database query. I previously had the menu working but...
1
by: Red | last post by:
Hi, Can someone give me a starting point, as I can't figure this out myself. I want to create a breadcrumb trail on a site, but instead of being generated by cookies or a directory structure,...
2
by: -D- | last post by:
I'm taking my first stab at using xml, so please bear with my novice questions and understanding of xml. I'm trying to create an xml file that holds all my website navigation. If I understand...
1
by: Paul | last post by:
Below is the html and css. It works in Firefox but not IE. When you click on "Your Links", it should cause a new menu "system" to open up to the right of the "Your Links" with two menu options. ...
16
by: gnawz | last post by:
I have a pagination function I am using in a file called functions.php as below<? //Pagination functions function getPagingQuery($sql, $itemPerPage = 10) { if (isset($_GET) && (int)$_GET > 0) ...
1
by: jeremyjcochran | last post by:
I'm trying to make an online store and have everything working so far. The only problem I am having is making a multi level navigation. When someone clicks "mens" section it brings up stuff like...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.