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>
}






--
Ralf-René Schröder
http://if-20.com  ... YAML templates for TYPO3
______________________________________________
_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an