[TYPO3-formidable] best way for getting oDataHander data in	auserobj lister
    Stéphane FILLION 
    s.fillion at ameos.com
       
    Mon Aug 16 09:32:05 CEST 2010
    
    
  
Hello Domi,
In my opinion, the best way is to use a renderlet:LISTBOX (or renderlet:CHECKBOX)
<column name="gender" type="renderlet:LISTBOX">
	<data>
		<items>
			<item caption="male" value="0" />
			<item caption="female" value="1" />
		</items>
	</data>
</column>
Regards,
Stephane
 
-----Message d'origine-----
De : typo3-project-formidable-bounces at lists.typo3.org [mailto:typo3-project-formidable-bounces at lists.typo3.org] De la part de Domi Garms
Envoyé : lundi 16 août 2010 07:02
À : TYPO3 project list for the FORMidable extension
Objet : [TYPO3-formidable] best way for getting oDataHander data in auserobj lister
Good Morning,
I just wondering what would be the easiest way for getting the value
for a renderlet in a LISTER. I want to render the gender, which is
saved as 0 or 1 in the datasource, it should rendered as male or
female
My snippet is:
<!-- GENDER -->
				<column name="gender" type="renderlet:BOX" mode="inline" >
					<html>
						<userobj>
							<php><![CDATA[
								$aData = $this->oDataHandler->getListData();
								$aData['gender'] = ($aData['gender'] == 1) ? "female" : "male";
								return $aData['gender'];
							]]></php>
						</userobj>
					</html>
				</column>
Because I need this function quite often, not sure if there is a
better way for doing it...Thanks for any hint!
Regards,
Domi
_______________________________________________
TYPO3-project-formidable mailing list
TYPO3-project-formidable at lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-formidable
    
    
More information about the TYPO3-project-formidable
mailing list