From 51b361bbb129164973badaa4480c1aaa2306685d Mon Sep 17 00:00:00 2001 From: Roland Haeder Date: Mon, 6 Apr 2015 01:01:43 +0200 Subject: [PATCH] Configuration data is now being inserted as same as other data. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Roland Häder --- inc/classes/main/template/class_BaseTemplateEngine.php | 2 +- .../main/template/menu/class_MenuTemplateEngine.php | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/inc/classes/main/template/class_BaseTemplateEngine.php b/inc/classes/main/template/class_BaseTemplateEngine.php index 4f896266..ba5208cb 100644 --- a/inc/classes/main/template/class_BaseTemplateEngine.php +++ b/inc/classes/main/template/class_BaseTemplateEngine.php @@ -1188,7 +1188,7 @@ class BaseTemplateEngine extends BaseFrameworkSystem { // Sweet and simple... //* DEBUG: */ self::createDebugInstance(__CLASS__)->debugOutput('BASE-TEMPLATE[' . __METHOD__ . ':' . __LINE__ . ']: variableName=' . $variableName . ',getConfigEntry()=' . $this->getConfigInstance()->getConfigEntry($variableName)); - $this->setVariable('config', $variableName, $this->getConfigInstance()->getConfigEntry($variableName)); + $this->assignVariable($variableName, $this->getConfigInstance()->getConfigEntry($variableName)); } /** diff --git a/inc/classes/main/template/menu/class_MenuTemplateEngine.php b/inc/classes/main/template/menu/class_MenuTemplateEngine.php index d118bae7..62997fa8 100644 --- a/inc/classes/main/template/menu/class_MenuTemplateEngine.php +++ b/inc/classes/main/template/menu/class_MenuTemplateEngine.php @@ -762,7 +762,6 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla * Renders this menu entry, as every block all variables got overwritten * with data from next entry. * - * @todo 'anchor_href' may needs expanding with full URL * @return void */ private function renderMenuEntry () { @@ -777,6 +776,12 @@ class MenuTemplateEngine extends BaseTemplateEngine implements CompileableTempla // Copy variable $variableValue = $this->readVariable($variableName); + // Is the key 'anchor-href'? + if ($variableName == 'anchor-href') { + // Expand variable with URL then + $variableValue = '{?base_url?}/' . $variableValue; + } // END - if + // ... into the instance $templateInstance->assignVariable($variableName, $variableValue); } // END - foreach -- 2.39.5