[Date Index][Thread Index]
[Date Prev][Date Next][Thread Prev][Thread Next]
Re: breadcrumb navigation trail
- From: Anders Dinsen <nospam@thanx>
- Date: Sun, 3 Mar 2002 22:18:35 +0100 (CET)
Hi Tibor
I'd like to suggest another solution in which every document's title and
description headers can be referenced from other documents. A directory's
title is the title of the index-document of that directory.
>From that, the bread crumb trail can be constructed.
I've implemented this on my site http://dinsen.net/, but it's not made
with WML, im afraid, but a similar system that I call PMCMS which is based
around the macro processor that goes in WML: mp4h.
Here's what I do: When a document is referenced in a hyperlink, the source
file (in this case it would be the WML file) is looked up and used if it's
found to extract the meta information of the document (title and
description). If the WML source isn't available, then the HTML document is
looked up and used instead.
I use a simple mp4h script to extract the meta information from the
doucment. The source can be viewed on:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/pmcms/pmcms/mp4h/getmetainfo.mp4hp?rev=1.4
(It's part of PMCMS).
To extract the meta information from a file, I do:
mp4h getmetainfo.mp4hp <file>
This produces an output like:
<set-var title="the title in the file">
<set-var description="the description in the file">
which is fed into the script processing the file that needs the
information by:
<preserve title description />
<include command="mp4h getmetainfo.mp4h <get-var file />" />
Use the title and description somehow, e.g. to construct a link
<restore title description />
I use this methon in PMCMS to construct TITLE attributes on hyperlinks
too.
I hope that this can serve as inspiration.
Cheers,
- Anders
On Fri, 1 Mar 2002, Tibor Simko wrote:
> Hello
>
> Has anybody created a template for automatic creation of the
> breadcrump navigation trail[1] for websites containing many nested
> subdirs?
>
> For the CERN chess site[2] I'm currently using a simple and plain
> approach, where the trail links to parent dirs are specified verbatim
> in a template file in each subdir. This would become impractical to
> maintain if the site contains many nested subdirs and if one has to
> rename subdirs or to move them along, etc.
>
> It's relatively easy to make a script to create this trail
> automatically, based on the dir structure and a config file with
> desired link names, but perhaps somebody has done that already, so I
> thought of asking here in order not to reinvent the wheel :-). TIA.
>
> Tibor
>
> Footnotes:
> [1] For definition, see <http://www.useit.com/alertbox/991114.html>.
> [2] See for example the orange-coloured navigation trail on the page:
> <http://chess.cern.ch/ratings/elocalc.en.shtml>.
>
>
> ______________________________________________________________________
> Website META Language (WML) www.engelschall.com/sw/wml/
> Official Support Mailing List sw-wml@engelschall.com
> Automated List Manager majordomo@engelschall.com
>
--
Anders Dinsen
anders@dinsen.net
http://dinsen.net/anders/
______________________________________________________________________
Website META Language (WML) www.engelschall.com/sw/wml/
Official Support Mailing List sw-wml@engelschall.com
Automated List Manager majordomo@engelschall.com