[mrtg] Templates - how to include boilerplate
Steve Shipway
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
Include: boilerplate.conf
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"
BACKGROUND="/images/playboy/mindy.gif">
PageFoot[$]: <small>Copyright me. Don't look at it with your eyes
open.</small>
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
these directives.
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
the routers2.conf.
Steve
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...
URL: http://lists.oetiker.ch/pipermail/mrtg/attachments/20070919/6f27da35/attachment-0001.html
More information about the mrtg
mailing list