Help me understand something about what you are doing... when you say 'MergeBlock for menus' is that becasue you are populating the menus from a data array or a db query?
If you are concerned that menus may (probably will) change in the future - and you don't want to have to edit every page to make the changes - then consider making a static html for a menu, then do a simple
[onload;file='menu-1.html';] |
in each of your site's pages.
then you only ever need to edit the menu-1.html file.
I have one master template with my headers, sidebar menus & db widgets, and footer -- with the center block unspecified. Then I use this master template as the beginnings for each of the individual pages in the site.
If some of your stock items are 'widgets' based on db query results then use the also simple
[onload.file;script=specialbox.php;subtpl] |
where the script specialbox.php is a php script that runs TBS and calls it's own template file
Just try these trick to get them working in trivial cases to see the inner workings
BTW -- here's a code snippet from Skrol29 it belongs at the top of EVERY TBS php file - both the main files and the subtemplate scripts
//include your TBS class here
include_once("/abs_path/script_to_include_tbsclass_dbhandler_plugins.php");
// ======== thanks Skrol29 ==========
if (isset($this)) {
// We are under the TBS Subtemplate Mode =>
// variables are always local, not global,
// and the TBS object is referenced by
// variable $this.
$TBS =& $this;
$TBS->NoErr = true;
} else {
// subscript can be run under normal mode =>
// corresponding template will be displayed
// like a main template.
// include_once('tbs_class.php') ;
$TBS = new clsTinyButStrong;
$TBS->NoErr = true;
}
|
Using this snippet insures that your master and subtemplate code will work.
Cheers, and thanks for TBS every day
TomH