Hi!
I want to include a file with the TMPL_INCLUDE, but I want the filename to be 
variable, so the included file depends on some variables in the script.
I tried the following:
____________________________________________

Template-File:
<TMPL_INCLUDE NAME="PATH_TO_CONTENT_FILE">
Scipt:
$template->param(
      PATH_TO_CONTENT_FILE => 'my_template.tmpl',
  );
____________________________________________

Template-File:
<TMPL_INCLUDE NAME="<TMPL_VAR ESCAPE=HTML NAME="PATH_TO_CONTENT_FILE">">
Script:
$template->param(
      PATH_TO_CONTENT_FILE => 'my_template.tmpl',
  );
____________________________________________

Well, as I expected neither of the two ways worked. If someone knows a way to realize 
a variable call of TMPL_INCLUDE, please tell me. Else I would be happy if it is 
possible to implement an extension for HTML:TEMPLATE to make this run.

I know that one possible way would be to do things like this:
<TMPL_IF NAME=NUMBER1>
<TMPL_INCLUDE NAME="my_template.tmpl">
</TMPL_IF>
<TMPL_IF NAME=NUMBER2>
<TMPL_INCLUDE NAME="my_template.tmpl">
</TMPL_IF>
<TMPL_IF NAME=NUMBER3>
<TMPL_INCLUDE NAME="my_template.tmpl">
</TMPL_IF>
.......
But this is only possible with smaller sites. Mine includes about 100 pages that shall 
all be accessible with the script (or a similar one) at the top of my mail.

Thanks, Christoph

PS: If you don't understand something ask me. I'm german and I know my English is not 
the best.

Reply via email to