[TYPO3-project-formidable] NEW in 0.6: Renderlet CHOOSER

Jerome Schneider j.schneider at ameos.com
Tue Dec 19 20:10:34 CET 2006


Yes, it does :)

Done like this:



<datahandler:LISTER>
	<!-- ... -->
	<pager>
		<rows alternate="###ROW1###,###ROW2###">
			<perpage>
				<userobj>
					<php><![CDATA[
					
	return $this->aORenderlets["nbres"]->_getValue();

					]]></php>
				</userobj>
			</perpage>
		</rows>
	</pager>

	<ifempty>
		<html><![CDATA[

	<p class="text">no results !!!</p>

		]]></html>
	</ifempty>

	<!-- ... -->

</datahandler:LISTER>

<!-- ... -->
	
<renderlet:CHOOSER name="nbres" renderonly="true">

	<separator><![CDATA[ - ]]></separator>
	<data>
		<items>
			<item caption="15" value="15" />
			<item caption="50" value="50" />
			<item caption="100" value="100" />
		</items>
		<defaultvalue>15</defaultvalue>
	</data>
	<wrap><![CDATA[ &lt; | par page&gt;]]></wrap>

	<wrapselected><![CDATA[<span class="lienrouge2">|</span>]]></wrapselected>

	<wrapitem><![CDATA[<span class="lienrouge">|</span>]]></wrapitem>

</renderlet:CHOOSER>

Note that the renderlet is renderonly;
Note also the new <ifempty> tag in the lister :)


Have fun
Jerome




François SCHOSSIG a écrit :
> Does the <list 15-50-100 par page> mean that it could be possible to 
> give the possibility to a visitor to modify the number of elements shown 
> in a lister ?
> -- 
> F. SCHOSSIG, ICT Manager
> Assemblée des Régions d'Europe
> http://www.a-e-r.org
> 
> 
> Le 19 déc. 06 à 11:00, Jerome Schneider a écrit :
> 
>> For those of you who use v0.6pre, a new renderlet CHOOSER is available.
>> It displays a list of push-button links.
>>
>> See an example of usage here:
>>
>> http://www.ameos.com/notre-offre/typo3-la-gestion-de-contenu/formidable
>>
>>
>> Config for the example
>>
>>
>>
>> <renderlet:CHOOSER name="abc">    <!-- column abc doesn't exists in DB 
>> -->
>>                 <!-- so search on these 3 fields -->
>>     <search onfields="name,firstname,username">
>>         <mode>
>>             <startswith />    <!-- supports LIKE 'A%' -->
>>             <!--googlelike /-->
>>         <!-- supports LIKE '%myword%' + logic AND, OR, ... -->
>>         </mode>
>>     </search>
>>     <data>
>>         <items>
>>             <item caption="Tout" value="" />
>>             <item caption="0-9" value="number" />
>>             <item caption="A" value="a" />
>>             <item caption="B" value="b" />
>>             <item caption="C" value="c" />
>>             <item caption="D" value="d" />
>>             <item caption="E" value="e" />
>>             <item caption="F" value="f" />
>>             <item caption="G" value="g" />
>>             <item caption="H" value="h" />
>>             <item caption="I" value="i" />
>>             <item caption="J" value="j" />
>>             <item caption="K" value="k" />
>>             <item caption="L" value="l" />
>>             <item caption="M" value="m" />
>>             <item caption="N" value="n" />
>>             <item caption="O" value="o" />
>>             <item caption="P" value="p" />
>>             <item caption="Q" value="q" />
>>             <item caption="R" value="r" />
>>             <item caption="S" value="s" />
>>             <item caption="T" value="t" />
>>             <item caption="U" value="u" />
>>             <item caption="V" value="v" />
>>             <item caption="W" value="w" />
>>             <item caption="X" value="x" />
>>             <item caption="Y" value="y" />
>>             <item caption="Z" value="z" />
>>         </items>
>>     </data>
>>     <wrap><![CDATA[&lt; | &gt;]]></wrap>
>>     <wrapselected><![CDATA[<span 
>> class="lienrouge2">|</span>]]></wrapselected>
>>     <wrapitem><![CDATA[<span class="lienrouge">|</span>]]></wrapitem>
>>     <separator><![CDATA[&nbsp;]]></separator>
>> </renderlet:CHOOSER>
>> _______________________________________________
>> TYPO3-project-formidable mailing list
>> TYPO3-project-formidable at lists.netfielders.de
>> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-project-formidable 
>>
> 


More information about the TYPO3-project-formidable mailing list