Categories > TinyButStrong general >

Having trouble inserting a subtemplate that is in a different folder than the .tpl that calls it

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: John
Date: 2010-11-21
Time: 02:43

Having trouble inserting a subtemplate that is in a different folder than the .tpl that calls it

I've got a logout file that I want to insert at the end of my template. I can insert this file by using the syntax [onload;file=logout.tpl] but cannot do the same when I try [onload;file=../includes/../error.tpl]

What's the simplest way to insert this template? Right now it looks like I have to make a copy of my logout file in the same directory as my template file. 
By: Skrol29
Date: 2010-11-21
Time: 11:11

Re: Having trouble inserting a subtemplate that is in a different folder than the .tpl that calls it

This is strange.

You should first check that there is no space or unexpected character in the source of you path.
Then try with delimiters, like this:
[onload;file='../includes/../error.tpl']

TBS just uses fopen() to get sub-templates. If it fails, then it searches the file in the folder of the last opened template.
By: John
Date: 2010-11-21
Time: 16:50

Re: Having trouble inserting a subtemplate that is in a different folder than the .tpl that calls it

Thanks for the reply. It really helps to know that TBS should behave the way I expected. I've got it working now.