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?
Re: PHP and template structure
have you seen: