2010-11-03 Steffen Kamper <steffen@typo3.org>
+ * Fixed bug #16199: Optimize stdWrap usage for TypoScript content element HMENU (Thanks to Jo Hasenau)
* Fixed bug #16189: Optimize stdWrap usage for TypoScript content element CLEARGIF (Thanks to Jo Hasenau)
* Fixed bug #16217: Regression : Typoscript "required" did not work anymore (Thanks to Jo Hasenau)
* Fixed bug #16227: Optimize stdWrap usage for TypoScript content element HTML (Thanks to Jo Hasenau)
* @return string Output
*/
public function render($conf = array()) {
- $content = '';
+
+ $theValue = '';
+
if ($this->cObj->checkIf($conf['if.'])) {
+
$cls = strtolower($conf[1]);
+
if (t3lib_div::inList($GLOBALS['TSFE']->tmpl->menuclasses, $cls)) {
- if ($conf['special.']['value.']) {
+
+ if (isset($conf['special.']['value.'])) {
$conf['special.']['value'] = $this->cObj->stdWrap($conf['special.']['value'], $conf['special.']['value.']);
}
+
$GLOBALS['TSFE']->register['count_HMENU']++;
$GLOBALS['TSFE']->register['count_HMENU_MENUOBJ'] = 0;
$GLOBALS['TSFE']->applicationData['GMENU_LAYERS']['WMid'] = array();
$menu->parent_cObj = $this->cObj;
$menu->start($GLOBALS['TSFE']->tmpl, $GLOBALS['TSFE']->sys_page, '', $conf, 1);
$menu->makeMenu();
- $content .= $menu->writeMenu();
+
+ $theValue .= $menu->writeMenu();
+
}
- if ($conf['wrap'])
- $content = $this->cObj->wrap($content, $conf['wrap']);
- if ($conf['stdWrap.'])
- $content = $this->cObj->stdWrap($content, $conf['stdWrap.']);
+
+ $wrap = isset($conf['wrap.'])
+ ? $this->cObj->stdWrap($conf['wrap'], $conf['wrap.'])
+ : $conf['wrap'];
+ if ($wrap) {
+ $theValue = $this->cObj->wrap($theValue, $wrap);
+ }
+
+ if (isset($conf['stdWrap.'])) {
+ $theValue = $this->cObj->stdWrap($theValue, $conf['stdWrap.']);
+ }
+
}
- return $content;
+
+ return $theValue;
+
}
}
include_once ($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['tslib/content/class.tslib_content_hierarchicalmenu.php']);
}
-?>
\ No newline at end of file
+?>