Creating Footers in Htm4l

Lots of people have information they place at the bottom of their pages to do various thing, typically to return people to their homepage. For example, check out the footer at the bottom of this page.

Of course, no-one wants to edit every file when they decide to change their footer information. Instead, everyone wants to use a single htm4l macro at the bottom of their pages and just edit the macro instead and type "make". It's a trivial application of htm4l, but an important one, since so many people do it.

Here is the htm4l code I use to create the footers at the bottom of all the htm4l example pages (this macro was also discussed on the page on file inclusion).

define(`m4_my_htm4l_example_end', ` <p> <hr> <font size="2"> Back to the htm4l m4_my_url(`htm4l/main', `home page'). Back to the htm4l m4_my_url(`htm4l/examples', `examples page'). </font> <br> <font size="1"> &copy; m4_my_sig (m4_my_email). m4_last_modified </font> m4_html_end ')

Which generates the footer you see below. This footer macro includes calls to other macros which are not explained here. It should be clear what they do. If it's not, view the source of this page or, look in the macro files you get in the htm4l distribution.

Back to the htm4l home page. Back to the htm4l examples page.
© Terry Jones (terry <AT> Last modified: Mon Oct 2 02:21:32 CEST 2006