By: Skrol29
Date: 2005-08-18
Time: 10:03
|
Re: Totally confused with SubTemplates
Hello,
> PHP.tpl has some PHP commands do grab some data from a database [...]
Your template shouldn't have Php commands when you are using a Template System. You should do this job in the PHP side only.
If you want the sub-template to have commands specific to it, then you can use parameters 'script' and 'subtpl' together. This enables you to run a specific function or script for merging the sub-template part like if it was a normal template.
>Also is their anyway of "simplifying" the tags used?
>Like instead of [var.Name]
Yes and no. 'var' is an internal keyword that cannot be modified.
But You can merge a sries of fields names as you wich using MergeField().
For example : $TBS->MergeField('$',$_GLOBALS);
will merge all fields like [$.name] in one shot.
|