Re: [PHP] navigation / location bar



Interesting but how to make this hierarchy ?
this i do not know in PHP :-(
where can i find code examples ?

On Tue, Sep 30, 2008 at 5:27 PM, Stut <stuttle@xxxxxxxxx> wrote:

On 30 Sep 2008, at 16:04, Alain Roger wrote:

a lot of web sites propose a locationbar (something like dynamic map site)
to end user when they are browsing the website.
usually i looks like that:

Home > Products > Software > Operating System > Windows XP

User can come back to a previous parent node by just clicking on the name,
for example : Software.

so:
1. what is the best method to use to create such "location bar" ? (array
stored in session variable ?)
2. how to populate this bar ? (each time that user visit a page, the array
is updated. if yes, how ?)


These are usually called breadcrumbs and come in two forms. One is true to
the name and the other is actually the page location on the site rather than
crumbs.

True breadcrumbs store the URL and name of the last n pages the user
visited and displays them as links to allow the user to go back through
their browser history. Since this duplicates functionality that exists in
99.99999% of browsers out there this type is pretty rare these days. These
are pretty simple to implement but you need some way to store an RRD array
between requests.

The more common type of breadcrumb is simply the location within the site.
Your example above is of this type. Occasionally you'll find these are
customised slightly based on user activity but for the most part they're
simply an indication of where in the site structure the page is.

Given that they're linked more to the page than the user there's no need to
track anything between pages unless you want to customise them for the user.
All your site need to be able to do is create the heirarchy up to the
homepage from any page.

As examples check out the following pages (under the orange bar)...

http://uk.freeads.net/
http://pets.uk.freeads.net/
http://pets.uk.freeads.net/cats/
http://pets.uk.freeads.net/cats/search?for=kitten

And regional versions...

http://aberdeen.uk.freeads.net/
http://aberdeen.uk.freeads.net/pets/
http://aberdeen.uk.freeads.net/pets/cats/
http://aberdeen.uk.freeads.net/pets/cats/search?for=kitten

If your site can't figure out where it is in the heirarchy then you've got
other problems more important than not being able to give the user
breadcrumbs.

-Stut

--
http://stut.net/




--
Alain
------------------------------------
Windows XP SP3
PostgreSQL 8.2.4 / MS SQL server 2005
Apache 2.2.4
PHP 5.2.4
C# 2005-2008


Relevant Pages

  • Re: [PHP] navigation / location bar
    ... On 30 Sep 2008, at 16:33, Alain Roger wrote: ... If you actually mean how do you build the HTML I suggest you find a begineers guide to PHP and work through that before tackling breadcrumbs. ... (each time that user visit a page, the array ...
    (php.general)
  • Re: [PHP] navigation / location bar
    ... (each time that user visit a page, the array ... True breadcrumbs store the URL and name of the last n pages the user visited and displays them as links to allow the user to go back through their browser history. ... If your site can't figure out where it is in the heirarchy then you've got other problems more important than not being able to give the user breadcrumbs. ...
    (php.general)
  • Re: PHP include in PHP tag? Possible?
    ... I have a website which I use PHP to fill in the breadcrumbs and the ... One of my content pages has an API, which requires a ' quote symbol. ...
    (php.general)
  • Re: New to PHP help with breadcrumbs
    ... so I want the breadcrumbs with hyperlinks at the top of the page ... Normal HTML template... ... <?php print; ?> ... Not sure how to implement the echo in your suggestion. ...
    (comp.lang.php)
  • New to PHP help with breadcrumbs
    ... Hi there So far I have designed a simple template file in PHP: ... Some pages dont work cause i use a ' symbol in the content. ... Is there a better way to do breadcrumbs? ...
    (comp.lang.php)