[TYPO3] Dynamic Menu

Lars Haendler typo3 at larshaendler.com
Fri Aug 22 09:45:47 CEST 2008


Hi,

Dan Osipov wrote:
> I'm reposting this question:
> 
> I am trying to create a menu, based on the pid passed in a URL variable. 
> The menu should be generated starting from that pid. I've tried various 
> variations of the code below, but it is always generating a menu from 
> the page pid, not the value of the variable.
> 
> Here is the code:
>     marks.BREADCRUMBS.special = rootline
>     marks.BREADCRUMBS.special.value.data = GP: tx_ttnews|backPid
>     marks.BREADCRUMBS.special.range = 0
>     marks.BREADCRUMBS.1 = TMENU
>     marks.BREADCRUMBS.1 {
>         # Do stuff
>     }
> 
> The value of tx_ttnews[backPid] is completely ignored...
> Can someone point me to a mistake?

I do not completly get what you acutally want to achieve but I had to do 
a rootline latly that added the product name of a tt_products element. I 
  did it with RECORDS because a simple TMENU cannot give something from 
a different table. The second

rootline = COA
#main config


#special if on a tt_products page
[globalVar = GP:tx_ttproducts_pi1|product > 0]
rootline.10.1.NO.linkWrap = |&raquo
rootline.10.special.range = 0|-2
rootline.20 = RECORDS
rootline.20 {
         dontCheckPid = 1
         tables = tt_products
         source.data = GPvar:tx_ttproducts_pi1|product
         conf.tt_products = COA
         conf.tt_products = TEXT
         conf.tt_products.field = title
         conf.tt_products.crop = 60 | ...
         conf.tt_products.wrap = &nbsp;<strong>|</strong>
}
[global]

Hope that helps

Regards
Lars


More information about the TYPO3-english mailing list