// Handle the dependency template
$this->handleTemplateDependency('menu', $templateDependency);
- // Code cleaned up...
- $this->partialStub('Cleaned because we do not want templates with partly HTML code.');
- }
-
- /**
- * Finishes the menu
- *
- * @return void
- */
- private function finishMenu () {
- $this->partialStub('Cleaned because we do not want templates with partly HTML code.');
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('current_node', 'menu');
}
/**
- * Starts the menu entries by loading a (maybe) provided template dependency
+ * Starts the menu entries
*
* @param $templateDependency A template to load to satisfy dependencies
* @return void
*/
- private function startEntryList ($templateDependency = '') {
- $this->partialStub('Cleaned because we do not want templates with partly HTML code.');
- }
-
- /**
- * Finishes the menu entries
- *
- * @return void
- */
- private function finishEntryList () {
- $this->partialStub('Cleaned because we do not want templates with partly HTML code.');
+ private function startEntryList () {
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('current_node', 'entry-list');
}
/**
* @return void
*/
private function startBlockHeader () {
- $this->partialStub('Cleaned because we do not want templates with partly HTML code.');
- }
-
- /**
- * Finishes the menu block header
- *
- * @return void
- */
- private function finishBlockHeader () {
- $this->partialStub('Cleaned because we do not want templates with partly HTML code.');
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('current_node', 'block-header');
}
/**
* @return void
*/
private function startBlockFooter () {
- $this->partialStub('Cleaned because we do not want templates with partly HTML code.');
- }
-
- /**
- * Finishes the menu block footer
- *
- * @return void
- */
- private function finishBlockFooter () {
- $this->partialStub('Cleaned because we do not want templates with partly HTML code.');
+ // Push the node name on the stacker
+ $this->getStackerInstance()->pushNamed('current_node', 'block-footer');
}
/**
}
/**
- * Starts the menu text
+ * Finishes the menu entries
*
* @return void
*/
- private function startText () {
- // Do we have a template instance?
- if (is_null($this->getTemplateInstance())) {
- // Init template instance for underlaying web templates
- $templateInstance = ObjectFactory::createObjectByConfiguredName('web_template_class');
-
- // Set it in this template engine
- $this->setTemplateInstance($templateInstance);
- } // END - if
-
- // Load the text template for this page
- $this->getTemplateInstance()->loadCodeTemplate('menu_text_start');
-
- // Set the variable group to page
- $this->setVariableGroup('menu');
-
- // Set its content in this template instance
- $this->assignVariable('text', $this->getTemplateInstance()->getRawTemplateData());
+ private function finishEntryList () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('current_node');
}
/**
- * Finishes the menu text
+ * Finishes the menu block header
*
* @return void
*/
- private function finishText () {
- // Load the text template for this page
- $this->getTemplateInstance()->loadCodeTemplate('menu_text_end');
+ private function finishBlockHeader () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('current_node');
+ }
- // Set the variable group to page
- $this->setVariableGroup('menu');
+ /**
+ * Finishes the menu block footer
+ *
+ * @return void
+ */
+ private function finishBlockFooter () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('current_node');
+ }
- // Set its content in this template instance
- $this->assignVariable('text_end', $this->getTemplateInstance()->getRawTemplateData());
+ /**
+ * Finishes the menu
+ *
+ * @return void
+ */
+ private function finishMenu () {
+ // Pop the last entry
+ $this->getStackerInstance()->popNamed('current_node');
}
/**