[TYPO3] addParams + fakemenu

PEF xx at xx.xx
Sun Apr 2 18:23:35 CEST 2006


Hi,
I'm trying to make a fakemenu, but I've come across some problems adding 
parameters to the url.

When entring the function productsItemArrayFunc ($menuArr, $conf), the 
parameter $menuArr is empty, which is as expected. I there by build my 
own menu:

function productsItemArrayFunc ($menuArr,$conf)    {

     $sysLang = $conf['parentObj']->sys_page->sys_language_uid;

     $parentPageId = $conf['parentObj']->id;
     if ($parentPageId == 8) {  // It's the "Products" page
           $query = "SELECT * FROM tx_bdprodinfo_prodcat WHERE
                     deleted = 0 AND hidden = 0 AND
                     sys_language_uid = {$sysLang} ORDER BY title";

           $res = $GLOBALS['TYPO3_DB']->sql_query($query);

           while ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
                if (is_array($row))    {
			// ... and if that product existed (a row was 					//     returned) 
then add it!
                  $cat = $row['uid'];
                  $row['uid'] = 8;
                  $row['alias'] = $GLOBALS['TSFE']->page['alias'];
		 // This won't work!!!
                  $row['addParams'] = "&cat=" . $cat;
                  $menuArr[] = $row;
             }
         }
     }

     return $menuArr;
}

I want to create an url, that looks similar to this:
http://domain/products.html?L=2&cat=3

but until now I only get
http://domain/products.html?L=2

Regards
Peter Falk
Copenhagnen
Denmark



More information about the TYPO3-english mailing list