#2 Enhancement - TMPL_INCLUDE

open
nobody
None
5
2005-06-15
2005-06-15
tomekM
No

Now, <TMPL_INCLUDE NAME="sth.tmpl"> looks for sth.tmpl
in "inc" subdirectory. It is not always desirable. I
suggest to add some extra parameter to indicate where
processor shall look for file being included.

For example:

<TMPL_INCLUDE NAME="sth.tmpl" PATH=".">

When PATH is omited, the standard subdir "inc" shall be
searched.

Regards,
tomekM

Discussion

  • tomekM
    tomekM
    2005-06-15

    • summary: Enhancment - TMPL_INCLUDE --> Enhancement - TMPL_INCLUDE
     
  • Paul Ferrell
    Paul Ferrell
    2009-03-23

    While it would be convenient to have this ability, the place for it isn't in the template file for several reasons.
    1. Changes to the template language would be incompatible with the various other htmltmpl parsers, not all of which are maintained here.
    2. That sort of definition really belongs in the template manager definition.
    3. Allowing includes from an arbitrary path also allows cycles in the include graph.

    I'll probably add this to the TemplateManager class or somewhere else more appropriate.