[TYPO3-project-formidable] access current row data from a LISTER (in <process>)

Paweł Bandura gawelx at gmail.com
Sun Sep 16 17:54:51 CEST 2007


Paweł Bandura pisze:
>> I need to check for each record if a user owns it - if so I will 
>> render a edit link. A few weeks ago Jerome told me that I could use 
>> $this->oDataHandler->_getListData(); from a <url> <userobj> this works 
>> great, but it does not work in <process> Is there a way of getting the 
>> row data from the <process>
> 
> I've got similar problem - I need to check some conditions based on 
> record uid for each row in the lister to display/hide the link.
> So, have you resolved this problem? Or maybe you've found another way to 
> do this?
> I'd be greatful for some clues :]

Hi

I've finaly found the way to do what I wan't. I used 
"process/beforedisplay" option in datahandler:LISTER.

I make renderlet(s):HIDDEN containing the value the test base on - and a 
renderlet(s), which will be shown or hidden depending on the test 
result. When the _processBeforeDisplay() function is called for the 
(every) row - it contains all renderlets ready to be displayed 
(including renderlets I potentialy wuold want to hide).
Then I perform the test - and according to the result I simply remove 
renderlets, which shouldn't be displayed.

I don't know if my explenation is clear enough to understand it, but the 
example should meke it more understandable :]

<process>
   <beforedisplay>
     <userobj>
       <php><![CDATA[

         $aRow = func_get_arg(1);

         if ($aRow["czy_adresat"] == 0) {
           $aRow["adresat"] = "&nbsp;";
         }

         return $aRow;

       ]]></php>
     </userobj>
   </beforedisplay>
</process>


But it still isn't nice and clean solution. I remove the renderlet which 
was prepared first. So, it's unnecessary waste of the server resources.

That's why I'm still looking for better way :]

-- 
Best regards
Paweł Bandura


More information about the TYPO3-project-formidable mailing list