By: Chris Fordham
Date: 2006-04-27
Time: 07:27
|
Template path
Say i have a template that loads subtemplates:
[onload;script='./include/templates/dtd-xhtml11.inc';subtpl]
How can I substitute a php variable for the template path here (its set from an included php script)?
like
[onload;script='$templatepath/dtd-xhtml11.inc';subtpl]
|
By: Skrol29
Date: 2006-05-01
Time: 19:49
|
Re: Template path
Hi Chris,
You can do it like this:
[onload;script='[var.templatepath]/dtd-xhtml11.inc';subtpl]
|
This works because [var] fields are checked inside parameter "script".
|
By: Chris Fordham
Date: 2006-05-02
Time: 02:36
|
Re: Template path
That doesn't work, the parsing of the var seems to only work with 'file' and not 'script'
works:
[onload;file='[var.conf_tbs.template_path]/dtd-xhtml11.inc';subtpl]
doesn't work:
[onload;script='[var.conf_tbs.template_path]/dtd-xhtml11.inc';subtpl]
why is this so?
|
By: Skrol29
Date: 2006-05-02
Time: 02:47
|
Re: Template path
It should work. I'll make some tests.
|
By: Skrol29
Date: 2006-05-02
Time: 13:12
|
Re: Template path
Hello,
You're rigth, there is a bug in TBS 2.05.7. This bug does not happens with TBS 3.0. I will probably fix it for 2.05, but if you cannot wait, you can make the following change in the source:
Line 978, replace:
$File = str_replace($this->ChrVal,$CurrVal,$Loc->PrmLst['script']);
with:
$File = str_replace($this->ChrVal,$CurrVal,$File);
|
By: Skrol29
Date: 2006-05-02
Time: 15:58
|
Re: Template path
Hello Chris,
The bug is fixed, and TBS 2.05.8 is available for download yet.
Thanks for your post.
|
By: Chris Fordham
Date: 2006-05-08
Time: 06:31
|
Re: Template path
Thanks Skrol29, can you update v3 script as well?
|
By: Sheepy
Date: 2006-05-08
Time: 12:09
|
Re: Template path
Uh... I thought it is said that the bug does not exist in 3.0?
|
By: Chris Fordham
Date: 2006-05-08
Time: 12:13
|
Re: Template path
Well i d/l v3 and it didn't work. May be i'm wrong.
|
By: Skrol29
Date: 2006-05-08
Time: 22:09
|
Re: Template path
Hargl.... :(
You're right, the bug is also in TBS 3.0. I could fix it before to publish.
Grrrrrrrr....
It will be fixed soon.
|
By: Chris Fordham
Date: 2006-05-09
Time: 05:44
|
Re: Template path
Sweet as.
|
By: Skrol29
Date: 2006-05-10
Time: 18:34
|
Re: Template path
The bug is fixed => TBS 3.0.1 available.
Thanks for having reported this bug.
|
|
Posting in progress.
Please wait...
|