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/05/01 15:43:29 UTC

Re: Building a site navigator

Hi Shane (and everyone else),
thanks for the help. Almost have this finished now.
Brian

----- Original Message -----
From: "Witbeck, Shane" <Sh...@bankofamerica.com>
To: <st...@jakarta.apache.org>
Sent: Wednesday, April 30, 2003 7:43 PM
Subject: RE: Building a site navigator


> Brian,
>
> All you should need is to pass a categoryID and get back a collection of
> parent categories to build the trail. Again, this is an excellent
candidate
> for a cache.
>
> -Shane
>
> -----Original Message-----
> From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
> Sent: Tuesday, April 29, 2003 9:20 AM
> To: Struts Users Mailing List
> Subject: Re: Building a site navigator
>
>
> Thanks Shane,
> as my last mail shows, that's roughly my plan. I want to try to do it all
in
> my template
> file. As my last email says, I was thinking of using the request attribute
> and
> setting a "path" collection variable in each action which the navigator
> could use.
> Does this sound sensible?
> cheers,
> Brian
>
> ----- Original Message -----
> From: "Witbeck, Shane" <Sh...@bankofamerica.com>
> To: <st...@jakarta.apache.org>
> Sent: Tuesday, April 29, 2003 2:03 PM
> Subject: RE: Building a site navigator
>
>
> > In this case it sounds as if your bread crumb trail would be modelled
> based
> > on your data. Why not walk up the hierarchical tree and build a
collection
> > to iterate over to build the trail? You will also probably have a couple
> of
> > static links for the "Home" and "Cars" sections. To avoid performance
> losses
> > on every page doing this query you could also implement a cache since
this
> > data probably won't change too much.
> >
> > HTH,
> >
> > Shane
> >
> > -----Original Message-----
> > From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
> > Sent: Tuesday, April 29, 2003 6:22 AM
> > 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
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


Re: Building a site navigator

Posted by Brian McSweeney <br...@aurium.net>.
Hi Jakob,

unfortunately I'm really not sure what your example does.
Remember, I don't want to do a full breadcrumb, just show
the parent categories up to the root node. As Shane pointed out,
isn't this just a case of passing a categoryID and get back a
collection of parent categories to build the trail.

perhaps I didn't understand what you meant?
Brian

----- Original Message -----
From: "Jacob Hookom" <ho...@uwec.edu>
To: "'Struts Users Mailing List'" <st...@jakarta.apache.org>
Sent: Thursday, May 01, 2003 4:33 PM
Subject: RE: Building a site navigator


> If you read any books from Joe Celko, he describes this kind of breadcrumb
> issue with graphs of pages/people/etc.
>
> Basically, you map your pages out in a breadcrumb table of some sorts with
> the rule: "if I am a leaf node, then there are N duplicate leaf nodes in
all
> possible paths to the null node"
>
> Home->Category A->Login Page
> Home->Category B->Login Page
>
> tbl_siteGraph
> pathId     pageType    pageId    pageTitle     step
> 1          root        1         Home          0
> 1          category    2         Category A    1
> 1          utility     3         Login Page    2
> 2          root        1         Home          0
> 2          category    4         Category B    1
> 2          utility     3         Login Page    2
>
> By having your site represented in a db like this, it opens a lot of
options
> for multi-page transactions and you can even slap another UID on the table
> so you only have to pass a single id from page to page to know exactly:
>
> "where the person is, where the person can go, and where the person was"
> -Jakob Nielsen.
>
> -Jacob Hookom
>
> | -----Original Message-----
> | From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
> | Sent: Thursday, May 01, 2003 8:43 AM
> | To: Struts Users Mailing List
> | Subject: Re: Building a site navigator
> |
> | Hi Shane (and everyone else),
> | thanks for the help. Almost have this finished now.
> | Brian
> |
> | ----- Original Message -----
> | From: "Witbeck, Shane" <Sh...@bankofamerica.com>
> | To: <st...@jakarta.apache.org>
> | Sent: Wednesday, April 30, 2003 7:43 PM
> | Subject: RE: Building a site navigator
> |
> |
> | > Brian,
> | >
> | > All you should need is to pass a categoryID and get back a collection
of
> | > parent categories to build the trail. Again, this is an excellent
> | candidate
> | > for a cache.
> | >
> | > -Shane
> | >
> | > -----Original Message-----
> | > From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
> | > Sent: Tuesday, April 29, 2003 9:20 AM
> | > To: Struts Users Mailing List
> | > Subject: Re: Building a site navigator
> | >
> | >
> | > Thanks Shane,
> | > as my last mail shows, that's roughly my plan. I want to try to do it
> | all
> | in
> | > my template
> | > file. As my last email says, I was thinking of using the request
> | attribute
> | > and
> | > setting a "path" collection variable in each action which the
navigator
> | > could use.
> | > Does this sound sensible?
> | > cheers,
> | > Brian
> | >
> | > ----- Original Message -----
> | > From: "Witbeck, Shane" <Sh...@bankofamerica.com>
> | > To: <st...@jakarta.apache.org>
> | > Sent: Tuesday, April 29, 2003 2:03 PM
> | > Subject: RE: Building a site navigator
> | >
> | >
> | > > In this case it sounds as if your bread crumb trail would be
modelled
> | > based
> | > > on your data. Why not walk up the hierarchical tree and build a
> | collection
> | > > to iterate over to build the trail? You will also probably have a
> | couple
> | > of
> | > > static links for the "Home" and "Cars" sections. To avoid
performance
> | > losses
> | > > on every page doing this query you could also implement a cache
since
> | this
> | > > data probably won't change too much.
> | > >
> | > > HTH,
> | > >
> | > > Shane
> | > >
> | > > -----Original Message-----
> | > > From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
> | > > Sent: Tuesday, April 29, 2003 6:22 AM
> | > > 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
> | > >
> | >
> ---------------------------------------------------------------------
> | > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> | > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> | > >
> | >
> | >
> | > ---------------------------------------------------------------------
> | > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> | > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> | >
> | > ---------------------------------------------------------------------
> | > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> | > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> | >
> |
> |
> | ---------------------------------------------------------------------
> | To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> | For additional commands, e-mail: struts-user-help@jakarta.apache.org
> |
> | ---
> | Incoming mail is certified Virus Free.
> | Checked by AVG anti-virus system (http://www.grisoft.com).
> | Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
> |
>
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>


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


RE: Building a site navigator

Posted by Jacob Hookom <ho...@uwec.edu>.
If you read any books from Joe Celko, he describes this kind of breadcrumb
issue with graphs of pages/people/etc.

Basically, you map your pages out in a breadcrumb table of some sorts with
the rule: "if I am a leaf node, then there are N duplicate leaf nodes in all
possible paths to the null node"

Home->Category A->Login Page
Home->Category B->Login Page

tbl_siteGraph
pathId     pageType    pageId    pageTitle     step
1          root        1         Home          0
1          category    2         Category A    1
1          utility     3         Login Page    2
2          root        1         Home          0
2          category    4         Category B    1
2          utility     3         Login Page    2

By having your site represented in a db like this, it opens a lot of options
for multi-page transactions and you can even slap another UID on the table
so you only have to pass a single id from page to page to know exactly:

"where the person is, where the person can go, and where the person was"
-Jakob Nielsen.

-Jacob Hookom

| -----Original Message-----
| From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
| Sent: Thursday, May 01, 2003 8:43 AM
| To: Struts Users Mailing List
| Subject: Re: Building a site navigator
| 
| Hi Shane (and everyone else),
| thanks for the help. Almost have this finished now.
| Brian
| 
| ----- Original Message -----
| From: "Witbeck, Shane" <Sh...@bankofamerica.com>
| To: <st...@jakarta.apache.org>
| Sent: Wednesday, April 30, 2003 7:43 PM
| Subject: RE: Building a site navigator
| 
| 
| > Brian,
| >
| > All you should need is to pass a categoryID and get back a collection of
| > parent categories to build the trail. Again, this is an excellent
| candidate
| > for a cache.
| >
| > -Shane
| >
| > -----Original Message-----
| > From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
| > Sent: Tuesday, April 29, 2003 9:20 AM
| > To: Struts Users Mailing List
| > Subject: Re: Building a site navigator
| >
| >
| > Thanks Shane,
| > as my last mail shows, that's roughly my plan. I want to try to do it
| all
| in
| > my template
| > file. As my last email says, I was thinking of using the request
| attribute
| > and
| > setting a "path" collection variable in each action which the navigator
| > could use.
| > Does this sound sensible?
| > cheers,
| > Brian
| >
| > ----- Original Message -----
| > From: "Witbeck, Shane" <Sh...@bankofamerica.com>
| > To: <st...@jakarta.apache.org>
| > Sent: Tuesday, April 29, 2003 2:03 PM
| > Subject: RE: Building a site navigator
| >
| >
| > > In this case it sounds as if your bread crumb trail would be modelled
| > based
| > > on your data. Why not walk up the hierarchical tree and build a
| collection
| > > to iterate over to build the trail? You will also probably have a
| couple
| > of
| > > static links for the "Home" and "Cars" sections. To avoid performance
| > losses
| > > on every page doing this query you could also implement a cache since
| this
| > > data probably won't change too much.
| > >
| > > HTH,
| > >
| > > Shane
| > >
| > > -----Original Message-----
| > > From: Brian McSweeney [mailto:brian.mcsweeney@aurium.net]
| > > Sent: Tuesday, April 29, 2003 6:22 AM
| > > 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
| > >
| > > ---------------------------------------------------------------------
| > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
| > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
| > >
| >
| >
| > ---------------------------------------------------------------------
| > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
| > For additional commands, e-mail: struts-user-help@jakarta.apache.org
| >
| > ---------------------------------------------------------------------
| > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
| > For additional commands, e-mail: struts-user-help@jakarta.apache.org
| >
| 
| 
| ---------------------------------------------------------------------
| To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
| For additional commands, e-mail: struts-user-help@jakarta.apache.org
| 
| ---
| Incoming mail is certified Virus Free.
| Checked by AVG anti-virus system (http://www.grisoft.com).
| Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
| 

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.476 / Virus Database: 273 - Release Date: 4/24/2003
 


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