[TYPO3-english] Rendering shortcuts

Paul Johnson paul at studioe9.com
Fri Nov 20 17:05:09 CET 2009


Thanks for your help Tomas, this is great.

Could you give a quick example how I would, for example, access and  
wrap an image field from the shortcut record in the below,  then I  
should be all set ?

Thanks again!

-Paul


On Nov 20, 2009, at 4:24 AM, Tomas Mrozek wrote:
> Please, DO NOT hijack threads! Start a new one!
>
>> How can I render tt_content records which are of ctype: shortcut ?
>
> Copy the way this type of content is set in TypoScript (see
> tt_content.shortcut). In short, use the RECORDS object.
>
> But remember that in the "Insert records" content element (=  
> shortcut),
> you can set records from various tables and when you insert a  
> tt_content
> record, it has many subtypes, each rendered differently. This might
> complicate your setup.
>
> You can try to start with something like this:
>
> temp.shortlist = CONTENT
> temp.shortlist {
>  table = tt_content
>  select {
>    where = colPos=2
>  }
>
>  renderObj = COA
>  renderObj.wrap = <div id="shortlist" >|</div>
>  renderObj {
>    5 = CASE
>    5 {
>      key.field = CType
>
>      shortcut = RECORDS
>      shortcut {
>        source.field = records
>        tables = tt_content
>        conf {
>          tt_content < tt_content
>        }
>      }
>    }
>  }
> }
>
> ...and continue by modifying
> temp.shortlist.renderObj.5.shortcut.conf.tt_content
>
> Tomas Mrozek
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-english

StudioE9, Media + Design + Technology
108 Leonard St, 13th Fl, NYC,10013
Web. http://www.studioe9.com
Blog. http://www.networke9.com



More information about the TYPO3-english mailing list