Hi,

Nick Weisser wrote:
> Hi there,
> 
> I'm trying to use the following TypoScript condition in my TypoScript setup:
> 
> # submenu only shows if more than one subpage
> # exists on the next level of the page tree
> [userFunc = user_match(checkLevels)]
> lib.submenu2 = HMENU
> [...]
> [end]
> 
> I've added the following user function to typo3conf/localconf.php as
> suggested by TSref:
> 
> function user_match($cmd) {
>       switch($cmd) {
>       case 'checkLevels':
>               if ("PID has more then one subpage") {
>                       return true;
>                }
>        break;
>       }
> }
> 
> I wonder if class.t3lib_treeview.php's getCount method can do the trick?
> 
> t3lib_treeView->getCount($uid)
> 
> How would I add this method to the user function above? Is this at all
> possible or does this require its own extension?


You can probably create a user function is some script and perform the
check in the database.

Not sure if t3lib_treeView->getCount($uid) will work as this has
references to BE user objects.

function init($clause='', $orderByFields='')    {
$this->BE_USER = $GLOBALS['BE_USER'];   // Setting BE_USER by default


regards,
Vikram




_______________________________________________
TYPO3-english mailing list
TYPO3-english@lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english

Reply via email to