[TYPO3] TS: userfunc with result of select
Boris Degenhardt
degenhardt at visor3000.com
Fri Sep 5 09:31:38 CEST 2008
Hey,
sorry but this doesnt work, all i get is the first letter of the
Contentobj that user ist:
if user = TEXT i get a "T", so i tried it with user = COA for
testingreasons and ill get a "C" ??
Best Regards
Boris
Boris Degenhardt schrieb:
> Hey Dmitry,
> i thank you very much!!! And i will read the stuff you told...
>
> Best Regards
> Boris
>
> Dmitry Dulepov [typo3] schrieb:
>> Hi!
>>
>> Boris Degenhardt wrote:
>>> after reading some Stuff i do understand that i can get the content
>>> of an CONTENT Element through cObjGetSingle, but for me its not clear
>>> how to pass it trough my TS, how do the TS look like??
>>
>> temp.v3User = TEMPLATE
>> temp.v3User {
>> ...
>> }
>>
>> temp.startUser = CONTENT
>> temp.startUser {
>> ...
>> renderObj = COA
>> renderObj {
>> # Store uid in the register for future use
>> 10 = LOAD_REGISTER
>> 10.fe_user_uid.field = uid
>> # Show the output
>> 20 < temp.v3User
>> # Clean up
>> 30 = RESTORE_REGISTER
>> }
>> }
>>
>> includeLibs.usericons = fileadmin/template/php/usericons.php
>> temp.icons = USER
>> temp.icons {
>> userFunc = user_icons->getIcons
>> # Below is TS object to get data from the register
>> user = TEXT
>> user.data = register:fe_user_uid
>> }
>>
>>
>> In the code:
>>
>> function getIcons($content, $conf) {
>> $cObj = t3lib_div::makeInstance('tslib_cObj');
>> $cObj->start(array());
>> $result = $cObj->cObjGetSingle($conf['user'], $conf['user.']);
>> }
>>
>> And once more: do not use COA unless you really need it. I suggest
>> also to read these parts of TSRef:
>> - about "register: whatever"
>> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/2/2/
>>
>> - about stdWrap and ".field"
>> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/5/1/
>>
>> - about LOAD_REGISTER
>> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.1.0/view/8/18/
>>
>>
More information about the TYPO3-english
mailing list