Issue Feature Closed

#15001excludeUidList : Exclude current page from a menu

Jean-Baptiste Rio 10/02/05, 21:59 updated 08/12/06, 14:21

Description

Before we have, maybe, a full stdWrap on this menu param, just have a look at this little enhancement which allow to exclude the current page from a menu (typically when using update or directory).

This enhancement accept “this” in the uid list. For example :

lib.mymenu = HMENU
lib.mymenu.entryLevel = -2
lib.mymenu.excludeUidList = this
lib.mymenu.1 = TMENU
…

This menu produces the sisters page from a page, except the page itself.

Change these codelines in class.tslib_menu.php (at 2 positions : line 763 and line 2613)
if (trim($this->conf[‘excludeUidList’])) {
- $banUidArray = t3lib_div::intExplode(‘,’, $this->conf[‘excludeUidList’]);
+ $banUidList = str_replace(‘this’, $GLOBALS[‘TSFE’]->page[‘uid’], $this->conf[‘excludeUidList’]);
+ $banUidArray = t3lib_div::intExplode(‘,’, $banUidList);
}

(issue imported from #M1520)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.