You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Brian McSweeney <br...@aurium.net> on 2003/04/29 12:21:45 UTC

Building a site navigator

Hi all,

I want to build a site navigator that should go on the top of all my pages.

For example, for the about page, it would look something like this:

Navigator: <link>Home</link>, about

However one of my pages ( category.jsp) shows a list of products in a 
particular category. The problem is, that the categories are defined in a 
tree structure:

eg:

cars --> fords --> specific model

This makes the navigator information far more dynamic. For example on the 
category page, if I was in the ford, specific model, I would want the navigator to look like:

Navigator: <link>Home</link>, <link>cars</link>, <link>fords</link>, specific model

I was just wondering if anyone has done this sort of thing before and has any 
tips before I get started. I'm currently using sitemesh to template my webapp and 
was considering putting the info in a request parameter from the actions, and trying 
to handle it all in the template. Any tips, greatly appreciated.

cheers,
Brian

RE: Building a site navigator

Posted by Hue Holleran <hu...@openAction.net>.
Hi Brian,

I have done this before for hierarchial project tasks, the easy thing there
was the data was coming from one reflexive table (i.e. each record had a
link to pk of parent in the table with the topmost link having a value of
null - like any tree view, I guess) and it was easy to just flatten the
hierarchy by recursively finding the parent and printing the link.

So, basically, as someone else suggested - there were static links, links to
parent tasks and related links to related things for the current task.

Interesting thread, though - can't wait for a more elegant, reusable answer!

H.

> -----Original Message-----
> From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
> Sent: 29 April 2003 11:22
> To: Struts Users Mailing List
> Subject: Building a site navigator
>
>
> Hi all,
>
> I want to build a site navigator that should go on the top of all
> my pages.
>
> For example, for the about page, it would look something like this:
>
> Navigator: <link>Home</link>, about
>
> However one of my pages ( category.jsp) shows a list of products in a
> particular category. The problem is, that the categories are defined in a
> tree structure:
>
> eg:
>
> cars --> fords --> specific model
>
> This makes the navigator information far more dynamic. For example on the
> category page, if I was in the ford, specific model, I would want
> the navigator to look like:
>
> Navigator: <link>Home</link>, <link>cars</link>,
> <link>fords</link>, specific model
>
> I was just wondering if anyone has done this sort of thing before
> and has any
> tips before I get started. I'm currently using sitemesh to
> template my webapp and
> was considering putting the info in a request parameter from the
> actions, and trying
> to handle it all in the template. Any tips, greatly appreciated.
>
> cheers,
> Brian
>
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.474 / Virus Database: 272 - Release Date: 18/04/2003
>
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.474 / Virus Database: 272 - Release Date: 18/04/2003


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org