[TYPO3] Use page contents for menu ?

Andreas Burg typo3 at andreasburg.de
Fri Aug 1 23:16:55 CEST 2008


Tyler Kraft schrieb:
> Hi Efstathios and Andreas
> 
>> @Tyler
>> sorry, I can not follow your instruction (hint)
> 
> 
> 
> Its really not that hard, just follow what I said. So first thing I said 
> to do was create the menu in TS setup and get it the way you want it - 
> as if it were part of the permanent TS setup
> 
> # we'll use a COA in case we want to use any of the stdWrap features 
> later down the line
> temp.spc_nav = COA
> 
> # instead of doing the whole menu from scratch lets just import one of 
> the predefined menus we'll use the menu of subpages (a directory menu)
> temp.spc_nav.10 < tt_content.menu.20.1
> temp.spc_nav.10.noBlur = 1
> 
> # change the wrapping for the whole menu and each menu item
> temp.spc_nav.10.wrap = <div class="spc_nav">|</div>
> temp.spc_nav.10.1.NO{
>     allWrap = <div class="navitem">|</div>
> 
>     linkWrap = <h3>|</h3>
>     # here we add the image - as you said you only wanted the content 
> off the page that's all I've done
>     # you could easily then adapt this to suit what ever layout needs 
> you specifically need. If it was me I'd instead
>     # of using the content from the page I'm make use of the media field 
> in the page preoperties
>     after.cObject=COA
>     after.cObject{
>         10 < styles.content.get
> 
>        # limit it to the first item only
>         10.select.max=1
>         10.select.pidInList.field = uid
> 
>        # this is a COA so we could add more item here yet if we needed 
> them. prehaps an additional link?
>         20 =TEXT
>         20.value = Read more &gt;
>         20.typolink.parameter.field = uid
>         20.typolink.target = {$content.pageFrameObj}
>     }
> }
> 
> 
> 
> The second thing I said to do was import it back into the rendering for 
> menu items
> 
> # now we import it back into the menu content item rendering listing for 
> future use
> tt_content.menu.20.10 < temp.spc_nav
> 
> # likewise we do a similar menu for selected pages (not there sub pages!)
> tt_content.menu.20.11 < temp.spc_nav
> tt_content.menu.20.11.1.special = list
> 
> 
> Finally I said to add it into the page ts_config so that it can be 
> selected from the menu options in the mene content item
> 
> TCEFORM.tt_content.menu_type{
>     addItems.10 = Menu of subpages to these pages (with first content item)
>     addItems.11 = Menu of these pages (with first content item)
> }
> 
> Like wise this could quickly and easily be adapted to make the whole 
> block (page title and image) one big link
> 
> Not that hard actually, just break things down into pieces and then read 
> TSref and TSconfig to figure out what exactly to do at each step. So all 
> in all this took 20minutes to do. I hope it helps.
> 
> This was tested and working but I then added the extra typo link so if 
> it doesn't work thats probably what where it is broken.
> 
> Tyler

wait, I'll try it and tell you
Andreas


More information about the TYPO3-english mailing list