[Templates] filtering includes
Rafiq Ismail (ADMIN)
rafiq@joshua.dreamthought.com
Tue, 5 Nov 2002 12:10:08 +0000 (GMT)
Hi Templatinos,
I'm looking for an easy way to solve a problem, which I'm currently
facing. We have a HUGE bunch of default html_header, footer, etc files
which tie into our legacy non-template system. They are all raw html with
the exception of a couple of unconventioanl strings which get substituted
into, in order to provide link uri's.
I initially wanted to just INCLUDE these files however, this wouldn't take
care of the whole string substitution problem. My untidy wrapper for this
was to write a plugin which did the file read and 'drop' into the
template. There are some extra checks such as picking up a default
language file where the i18n supported file doesn't exist.
I don't like this adopted approach and would like to find a neater way
around it. Is it easy to subclass template and write a personalised
alternative to mimic the functionality of INCLUDE, but take a set of qr'd
expressions to apply on it? Haven't looked at the code yet, but wanted to
seek sound advice before going off on a wild - or inefficient - goose
chase. Any ideas? I can't duplicate the headers and footers, etc, since
there are SO many of them and there is a requirement that I remain
compatible with the legacy format.
Cheers,
Rafiq