$templateInstance->loadCodeTemplate('home');
// Assign the home template with the master template as a content ... ;)
- $templateInstance->assignTemplateWithVariable('city_home', 'content');
+ $templateInstance->assignTemplateWithVariable('city_home', 'main_content');
// Load the master template
$templateInstance->loadCodeTemplate($masterTemplate);
// Transfer it to the template engine instance
$menuInstance->transferContentToTemplateEngine($templateInstance);
- // ... and all variables. This should be merged together in a pattern
- // to make things easier. A cache mechanism should be added between
- // these two calls to cache compiled templates.
+ /*
+ * ... and all variables. This should be merged together in a pattern
+ * to make things easier. A cache mechanism should be added between
+ * these two calls to cache compiled templates.
+ */
$templateInstance->compileVariables();
// Get the content back from the template engine and put it in response class
-<div id="content_main">
- Bla bla ...
+{?header?}
+
+<div id="master">
+ <div class="menu" id="menu">
+ {?menu_content?}
+ </div>
+
+ <div id="main_header">
+ {?city_header?}
+ </div>
+
+ <div class="main_content" id="main_content">
+ {?main_content?}
+ </div>
+
+ <div id="main_footer">
+ {?city_footer?}
+ </div>
</div>
+
+{?footer?}
{?app_full_name?} - {?title?}
</title>
- <meta name="author" content="$config[meta_author]" />
- <meta name="publisher" content="$config[meta_publisher]" />
- <meta name="keywords" content="$config[meta_keywords]" />
+ <meta name="author" content="{?meta_author?}" />
+ <meta name="publisher" content="{?meta_publisher?}" />
+ <meta name="keywords" content="{?meta_keywords?}" />
<meta name="robots" content="index,follow" />
- <meta name="description" content="$config[meta_description]" />
+ <meta name="description" content="{?meta_description?}" />
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<meta http-equiv="content-style-type" content="text/css" />
<meta http-equiv="content-script-type" content="text/javascript" />
--- /dev/null
+<div id="{?title_id?}" class="{?title_class?}">
+ {?title_text?}
+</div>
+
+<ul>
+{?block_content?}
+</ul>
+
+<div id="{?footer_id?}" class="{?footer_class?}">
+ {?footer_text?}
+</div>
--- /dev/null
+<li id="{?entry_id?}">
+ <a id="{?anchor_id?}" href="{?anchor_href?}" title="{?anchor_title?}">{?anchor_text?}</a>
+</li>
--- /dev/null
+Deny from all
-Subproject commit 69e15880c80ca131c7ddde022366d4198d0fce4c
+Subproject commit 7badfcb82a1ba6c5f547ac031ef33e8bf2bd8ede