[TYPO3-german] Menü aus Datensätzen

Kay Strobach typo3 at kay-strobach.de
Sat Apr 9 10:08:43 CEST 2011


Hey,

guck dir mal den Unterschied zwischen ACT und CUR an ;)

Grüße
Kay

Am 09.04.2011 09:51, schrieb Ralf-René Schröder:
> keiner eine Idee ???
> wie macht ihr es wenn in ein Menü Datensätze mit eingebaut werden müssen
> (mit ACT status)
> 
> 
> 
> Ralf-René Schröder schrieb:
>> Hallo... ich nutze ein Menü aus datensätzen entsprechend folgendee
>> Tutorials
>> http://www.typo3wizard.com/de/snippets/menus/menues-erstellen-mit-daten-aus-anderen-tabellen-als-pages-v2.html
>>
>>
>> irgendwie wird aber der ACT Status sowohl für das richtige Element,
>> als auch für das erste gesetzt
>> irgendjemand eine idee dazu (oder einen anderen besseren vorschlag ???
>> ich nutze TYPO3 4.5.2
>>
>> hier noch mal die userfunc und das TS direkt:
>>
>> class user_menuFunc {
>>   function makeMenuArray($content,$conf) {
>>     $menuArr = array();
>>     $lConf = $conf["userFunc."];
>>     $actuid = 0;
>>     if ($lConf['actextkey'] && $lConf['actextvar']) {
>>         $getval = t3lib_div::_GET();
>>         $actuid = $getval[$lConf['actextkey']][$lConf['actextvar']];
>>       }
>>       $res =
>> $this->cObj->exec_getQuery($lConf["table"],$lConf["select."]);
>>       if ($error = $GLOBALS['TYPO3_DB']->sql_error()) {
>>         $GLOBALS['TT']->setTSlogMessage($error,3);
>>       }
>>       else {
>>      
>> $GLOBALS['TT']->setTSlogMessage('NUMROWS:'.$GLOBALS['TYPO3_DB']->sql_num_rows($res));
>>
>>       while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
>>         if ($actuid!=0 && $actuid==$row['uid']) $row['ITEM_STATE']='ACT';
>>         $menuArr[] = $row;
>>       }
>>     }
>>   return $menuArr;
>>   }
>> }
>>
>>
>>
>> obj.theme = HMENU
>> obj.theme.special = userfunction
>> obj.theme.special.userFunc = user_menuFunc->makeMenuArray
>> obj.theme.special.userFunc.table = tx_myextension_theme
>> obj.theme.special.userFunc.select.pidInList = 141
>> obj.theme.special.userFunc.actextkey = tx_myextension_pi1
>> obj.theme.special.userFunc.actextvar = theme
>> obj.theme.1 = TMENU
>> obj.theme.1 {
>>   wrap = <ul class="theme">|</ul>
>>   NO {
>>     doNotLinkIt = 1
>>     stdWrap.field = navtitle // title
>>     stdWrap.typolink.useCacheHash = 1
>>     stdWrap.typolink.parameter = {$if_catalog.pageID.theme}
>>     stdWrap.typolink.additionalParams.dataWrap =
>> &tx_myextension_pi1[theme]={field:uid}
>>     stdWrap.data = debug:data
>>     allWrap = <li>|</li>
>>   }
>>   ACT < .NO
>>   ACT = 1
>>   ACT.allWrap = <li class="act">|</li>
>> }
>>
>>
>>
>>
> 
> 


-- 
http://www.kay-strobach.de - Open Source Rocks


More information about the TYPO3-german mailing list