Re: [SMARTY] Table of Contents
| From: | Markus Weber | Date: | Fri, 19 Sep 2003 12:42:20 +0000 |
| Subject: | Re: [SMARTY] Table of Contents | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-10241@lists.php.net to get a copy of this message | ||
> From: "Markus Weber" <preml@gmx.net>
> > can I use Smarty to create a "Table of Contents"? The Table of Contents
> > should contain links to all headlines on a page.
> >
> > Example:
> > <H1>Introduction</H1>
> > <H1>How to build a station</H1>
> > <H2>Step1</H2>
> > <H2>Step1</H2>
> >
> > For the above example an table of contents like the following should be
> > generated:
> >
> > | Table of Contents:
> > | - Introduction
> > | - How to build a station
> > | - Step 1
> > | - Step 2
>
> Seems like it'd be smarter to use CSS for this and define certain
> indentations for each <Hx> tag...
Thank you for your answer.
The problem are not the indentations.
I would like to create a Table of contents for a site like
http://web644.server18.glai.de/simutranstips/en/simu_tut/train.html
automatically.
>
> I guess you could do something like
>
> $H1 = "| - ";
> $H2 = "| - ";
>
> and use
>
> {$H1}Introduction
> {$H1}How to...
> {$H2}Step 1
>
> I'm sure there are other methods, too.
IMO that only affects the formating of attributes like <h1>. Is that true?
>
> ---John Holmes...
>
bye,
Markus
--
+++ GMX - die erste Adresse für Mail, Message, More! +++
Getestet von Stiftung Warentest: GMX FreeMail (GUT), GMX ProMail (GUT)
(Heft 9/03 - 23 e-mail-Tarife: 6 gut, 12 befriedigend, 5 ausreichend)
Jetzt selbst kostenlos testen: http://www.gmx.net