Categories > TinyButStrong general >

Is there any issue with inclusion of TBS templates

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Zeljko Dakic
Date: 2004-10-28
Time: 21:04

Is there any issue with inclusion of TBS templates

Hi All,

I started on small project with TBS to get my feet wet. Anyway here is what I am having issue with.
I have main page index.php and main.htm to control the overall layout.

On that page I would like to have different modules and one of those would be news module_news.php and module_news.htm and I used
[var.test;script='module_news.php';getob]
however when I do that, I just get result of module_news.php and lose index.php or main page. I tried to call TBS object differently and it didn't help.

Do you have any idea what I am doing wrong and how that might be corrected. In the meantime I turned everything to main script and using subtemplates but as you can see, I am trying to accomplish something else here. Also I tried this with regular php echo's and it worked.

Thanks for TBS, it is really nice templating system and keep up the good work.

Regards,
Zeljko Dakic
By: Skrol29
Date: 2004-10-29
Time: 10:59

Re: Is there any issue with inclusion of TBS templates

Hi Zelko,

When you use parameter script, you must think about 2 important points:

1: The sub-script is executed in a function context, not in the global context. It means that global variables are not available unless you declare them with the php insctruction 'global'.

2: The Show() method makes an 'exit' by default. You can tune this behavior using the Render property. So if you use Show() in the default behavior in your sub-script, it ends the whole script.
By: Zeljko Dakic
Date: 2004-10-29
Time: 16:56

Re: Is there any issue with inclusion of TBS templates

Hi,

Thank you for your reply.

I could see that something like that is happening. Do you have some idea what would be a good way to include result of other script? Or alternatively, is there a way to write modules so that they can have behaviour like I would like to accomplish?

Maybe without calling Show() in the modules. I will try but please give me your insight on this subject as you obviously know more than me.

Thanks.

Zeljko
By: Skrol29
Date: 2004-10-29
Time: 19:33

Re: Is there any issue with inclusion of TBS templates

> I will try but please give me your insight on this
> subject as you obviously know more than me.

No problem, but don't forget there is also a manual.
The Render property is documented.

I don't know enougth of your sub-script, but if it uses TBS and the Show() method, then put:
  $TBS->Render = TBS_OUTPUT;
before the call to Show().

By: meri
Date: 2007-09-07
Time: 09:12

Re: Is there any issue with inclusion of TBS templates

Zelko, molim te reci Dragani da mi se javi..Hvala-Meri:)