Categories > TinyButStrong general >

Inner templates

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Valerien
Date: 2003-04-15
Time: 10:40

Inner templates

Is it possible to handle an inner template system? It is very useful for sites that don't change the main template often (header, footer, navigation bar, etc) but have different behaviour for the content inside of that ...

If this capability is incorporated in the class, can you illustrate with some examples?

Thanks!
By: Skrol29
Date: 2003-04-15
Time: 10:59

Re: Inner templates

Hello Valerian,

Yes it is possible by using the file inclusion feature.
In the examples set (at the web site or given with the zip file) you have a page with file inclusion. It not illustrates a main template usage but the principle is the same.

You can have a main template in whom you include special sub-pages depending to your heading. Or you can do the opposite: include common headers and footers in each page.

You can also assicate a file inclusion with a script execution.
In the next version of TBS it will also be possible to execute a script with echo command which are redirected to the template.

There is something nice with TBS and file inclusion : the file you want to be included can be a normal HTML page. I mean with <headers> and <body>. Of course only the contents inside the <body> tags are keept, but it enables you to build your sub-pages with a visual Html editor and, most of all, to preview it in browers. Nice if you work with CSS too.

Skrol 29