[mrtg] Templates - how to include boilerplate
iwrtech at iwr.ru.ac.za
Wed Sep 19 08:23:39 CEST 2007
On 18 Sep 2007 , Grossman, Benjamin entreated about
"[mrtg] Templates - how to include boilerplate":
> 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.
I use a PHP include statement in my index pages, that is put there by
my indexmaker calls....
indexmaker --title="IWR Server Stats" --columns=2 \
--pagetop="<?PHP include('iwrhead.inc'); ?><br>Generated: `date`" \
iwrbsd.cfg > /usr/local/www/data/mrtg/index.html
the 'iwrhead.inc' file is actually php that auto indexes all the
other indexXXXX.html files in the current folder.
ok, seems that is not what you want, but it is a possible solution
for some of the files anyway.
DA Fo rsyth Network Supervisor
Principal Technical Officer -- Institute for Water Research
More information about the mrtg