Makes it possible to use template scripting in page menu items
authorMatthias Schmidt <gravatronics@live.com>
Sun, 19 May 2013 10:22:29 +0000 (12:22 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 19 May 2013 10:22:29 +0000 (12:22 +0200)
This is helpful if the language item has different values based on option settings, e.g. if a certain part of the language item is only visible if a related option is enabled.

wcfsetup/install/files/lib/data/page/menu/item/PageMenuItem.class.php

index ec4b6fdf6d7dc8f65cd00b979480b06d39ed10c3..1a59563dd4bfce372b0950758bf5d8de01270d25 100644 (file)
@@ -144,7 +144,7 @@ class PageMenuItem extends ProcessibleDatabaseObject implements ITreeMenuItem {
        protected function parseController() {
                if ($this->controller === null) {
                        $this->controller = '';
-                               
+                       
                        // resolve application and controller
                        if ($this->menuItemController) {
                                $parts = explode('\\', $this->menuItemController);
@@ -163,6 +163,6 @@ class PageMenuItem extends ProcessibleDatabaseObject implements ITreeMenuItem {
         * @return      string
         */
        public function __toString() {
-               return WCF::getLanguage()->get($this->menuItem);
+               return WCF::getLanguage()->getDynamicVariable($this->menuItem);
        }
 }