How to... use more automatic variables

We did silently add an automatic variable into the title tag of our examples in earlier tutorial pages. However you should know that there are more flavours of variable expansion that that. First of all, the "?" variable are lowercased and special markup being removed. That is better for the title tag of course, so we use that flavour now.

Other variables are intelligent to be "updating" variables, so you may add some text directly behind it and that text will be replaced. More flavours can be looked up in the section on variables but for our example we use the automatic "$today" variable. In the example we add it to the lower of the navigation bar with a leading "generated on" denotion.

  <html><head><title> my website <!--$title?--> </title>
 <style>
    H4 { text-align : right ; }
    > a:link    { text-decoration : none ; color : #000080 ; }
    a:visited { text-decoration : none ; color : #200060 ; }
    p         { text-align : justify ; }
 </style>
</head><body>
<table><tr valign="top">
<td width="140" bgcolor="yellow"> <!-- navigation -->
<br><a href="index.html"> Overview </a>
<br>-<a href="loremipsum.html"> Lorem Ipsum </a>
<br>-<a href="pagename.html"> more pages... </a>
<p>
<br> generated
<br><!--$today:=-->2004/xx
</td><td bgcolor="white"> <!-- body text -->
</td></tr></table></body></html>
          

Later we show that it is also possible to set the content of some meta variables so you are not limited to the builtin automatic variables like title or date. For example, you can add a <title> tag to the content source page which will override all automatics and just like with the standard html processing it will only be used to set the window title bar (it's not shown in the content area here).



Overview
- Lorem Ipsum
- more pages...


generated
2006-04-28

Lorem Ipsum

Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore m agna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed dia m nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et just o duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam er at, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet.