Categories > TinyButStrong general >

Redirect on template not found

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Youri
Date: 2008-05-25
Time: 23:54

Redirect on template not found

Hi Skrol,

Is it possible to extend LoadTemplate method with one extra argument specifying redirect location in case template is not found? If TBS will not found template it should redirect to this address instead of writing error message.

My next question: Is it possible to use SQL result as template source instead of file for html source saved in database? How to implement this?

Thanks a lot.
By: Skrol29
Date: 2008-05-26
Time: 00:30

Re: Redirect on template not found

Hi Youri,

> Extend LoadTemplate

This can be done easily with a TBS plug-in.
You can also cancel all error message before the LoadTemplate() and do the redirection id $TBS->Source is empty (which mens that no template has been loaded).

> Is it possible to use SQL result as template source

Yes, see:
   http://www.tinybutstrong.com/support.php#faq_load_from_string


Regards,