[TYPO3] TS: userfunc with result of select

Dmitry Dulepov [typo3] dmitry at typo3.org
Thu Sep 4 17:31:32 CEST 2008


Hi!

Boris Degenhardt wrote:
> i have the following TS and want to give user= in temp.icons the uid of 
> the user from the selectstatement of temp.startUser to use it in my 
> userfunc. Can somebody help? Thx alot

You'll have to call tslib_cObj::cObjGetSingle inside getIcons.

> temp.v3User = COA
> temp.v3User {
>     10 = TEMPLATE
>     10.template = FILE
>     10.template.file = {$html}user.html
>     10.workOnSubpart = BODY
>     10.marks {
>         IMAGE < temp.userImage
>         NAME = TEXT
>         NAME.field = username
>         GENUSS < temp.icons
>     }   
> }

Why this one is COA? There is no need for COA with a single member inside. Same applies to this:

> temp.startUser = COA
> temp.startUser {
>     10 = CONTENT

It only slows down your system and increases memory usage.

-- 
Dmitry Dulepov
TYPO3 Core team
My TYPO3 book: http://www.packtpub.com/typo3-extension-development/book
In the blog: http://typo3bloke.net/pages/book-reviews/presentation-zen-by-garr-reynolds/


More information about the TYPO3-english mailing list