[mrtg] Templates - how to include boilerplate
s.shipway at auckland.ac.nz
Wed Sep 19 05:21:43 CEST 2007
This could be achieved by creating a special file - eg, boilerplate.conf
Then in each MRTG file (or your template file), start off with the line
Then in the boilerplate.conf file, use commands like the following:
PageTop[^]: <small>This is mine, mine I tell you! Muahaha.</small><hr>
AddHead[_]: <link rev="webmaster"
href=mailto:president at whitehouse.gov>
BodyTag[_]:<BODY LEFTMARGIN="1" TOPMARGIN="1"
PageFoot[$]: <small>Copyright me. Don't look at it with your eyes
In fact you can put anything you like in here, so even including your
general global options would be a good idea. Note we are using the
prepend target for PageTop so that you can still use PageTop in the
various .cfg files. This is just an example; you don't need to use all
If using routers2 as a frontend, the same thing will mostly work, but
you will need to enable mrtgpagetop=yes in the routers2.conf.
Alternatively, just set your boilerplate in the pagetop= definition in
I am looking for a hand with adding a bunch of silly boilerplate html to
the top of every MRTG generated page.
It seems to me that the sensible place to do this would be in my Host
and Interface template files; however that still leaves me with about a
dozen different files that all need the same boilerplate. I'd like to be
able to use an INCLUDE inside the template, or some such mechanism. That
way, when it changes, they all change at once.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the mrtg