Categories > TinyButStrong general >

PHP and template structure

The forum is closed. Please use Stack Overflow for submitting new questions. Use tags: tinybutstrong , opentbs
By: Adam
Date: 2014-07-07
Time: 13:15

PHP and template structure

As a separate issue, I wondered if you could put me on the right track for building what I need with TBS?

The concept should be quite simple, but I want to make sure I'm using the best TBS methods to achieve it...

Essentially, I'm looking at the following structure:

1) core template ...this consists of HTML for the header (with top menu and language selector) and the footer (with bottom menu) plus a "contents" tag/block in between
2) sub template ...this consists of HTML for the "contents" tag/block in the core template
3) page content ...this is formatted text for tags in the core and sub templates
4) translations ...these are translations of page content in the various languages the site must support

So, when a page is requested:

a) the core template should be loaded
b) the relevant sub template should be merged into the core template
c) the relevant content (or translations) should be used to replace the tags throughout the merged template

Can anyone provide some example code to achieve this?
By: Skrol29
Date: 2014-07-08
Time: 12:00

Re: PHP and template structure