[TYPO3-project-formidable] rdt:LISTER with LINK: Adding the UID of the record to the URL

Hauke Hain newgrp at googlemail.com
Thu Mar 5 18:02:46 CET 2009


Hi Rego,

thank you for your answer.
It help me a lot, because I know how to pass something with the parameters 
though the XML-Syntax now.

Thanks.

Kind regards,
Hauke

"Manuel Rego Casasnovas" <mrego at igalia.com> schrieb im Newsbeitrag 
news:mailman.46812.1235975422.2904.typo3-project-formidable at lists.netfielders.de...
> Hello,
>
> On Sun, 1 Mar 2009 20:07:32 +0100
> "Hauke Hain" <newgrp at googlemail.com> wrote:
>> I have titles in my lister and I want to make a link where the uid of
>> the record is a URL parameter.
>> The problem is to get the UID. Her is the relevant part of my
>> XML-file:
>>
>> [...]
>>    <datasources>
>>    <datasource:DB name="pages">
>>     <sql>
>>           <userobj>
>>             <php><![CDATA[
>>           return 'SELECT r.title FROM preview_previews WHERE pid =
>> '.$GLOBALS['TSFE']->id.' AND r.deleted=0 AND r.hidden=0';
>>         ]]></php>
>>           </userobj>
>>         </sql>
>>    </datasource:DB>
>>   </datasources>
>>
>>  </control>
>>  <elements>
>>  <renderlet:LISTER name="allreviews" cachehash="true"
>> custom="scope='col'"> <datasource use="pages" />
>>    <template
>>           path="/typo3conf/ext/preview/res/tmpl/list_previews.html"
>>           subpart="###MAIN###"
>>           cssfile="/typo3conf/ext/preview/res/lister.css"
>>           alternaterows="###ROW1###, ###ROW2###"/>
>>    <columns>
>>     <column name="title" type="renderlet:LINK"
>> listHeader="LLL:listAll.title">
>>       <href><userobj><php><![CDATA[
>>       $aParams = ''; // From where??
>>       return $this->cObj->currentPageURL(
>>                   array('preview_pi1[show_preview]' =>
>> $aParams['uid'])); ]]></php></userobj></href>
>>     </column>    </column>
>>    </columns>
>>   </renderlet:LISTER>
>> [...]
>
> You can get the uid with something like:
>   $row = $oForm->oDataHandler->_getListData();
>   $row['uid'];
>
> About the $aParams is an array of parameters that is passed to a
> callback, for example:
> <userobj>
>   <extension>this</extension>
>   <method>getDetailURL</method>
>   <params>
>      <param>
>         <name>one_param</name>
>         <value>15</value>
>      </param>
>   </params>
> </userobj>
>
> Best regards,
>   Rego 



More information about the TYPO3-project-formidable mailing list