[TYPO3-project-formidable] Supress a Row in LISTER
Jerome Schneider
j.schneider at ameos.com
Fri Jan 12 11:15:17 CET 2007
Hello Fernando,
What you want to do is not possible this way.
The best would be to filter the returned rows earlier in the process.
Using *additional wheres* feature of the lister, this can be easily done
Something like this would do the trick:
<datahandler:LISTER>
<!-- ... -->
<sql>
<wheres>
<where term="name" comparison="!=" value="llllllll" />
<logic value="AND" />
<where term="someotherfield" comparison="IN" value="6,7" />
</wheres>
</sql>
<!-- ... -->
</datahandler:LISTER>
If you need to dynamicaly change the value to filter on, you can use a
*userobj* to achieve the same thing
Like this:
<datahandler:LISTER>
<!-- ... -->
<sql>
<wheres>
<where term="name" comparison="!=">
<value>
<userobj>
<php><![CDATA[
/* this is php code */
return "somevalue" . rand(0, 10) . "whatever";
]]></php>
</userobj>
</value>
</where>
<logic value="AND" />
<where term="someotherfield" comparison="IN" value="6,7" />
</wheres>
</sql>
<!-- ... -->
</datahandler:LISTER>
Hope this helps,
Jerome Schneider
Fernando A. a écrit :
> Hi
>
> I need to apply a special condition over each row to decide which row
> show and which one not. I ve tried with something like this
> <duringlisterraw>
> <userobj>
> <php><![CDATA[
> $aData = array_pop(func_get_args());
> if($aData["name"] != "llllllll"){
> return $aData=array();
> }else{
> return $aData
> }
> ]]></php>
> </userobj>
> </duringlisterraw>
>
> But it doesnt wotk right cause of the numrows counter and the wrapper of
> each row in the default template at LISTER datahandler.
>
> Any way or patch to solve it???
>
>
> Thanks
>
More information about the TYPO3-project-formidable
mailing list