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

Jerome Schneider typo3dev at ameos.com
Thu Mar 5 16:09:33 CET 2009


Hi Hauke !

Do it like this:

$aRow = $this->oDataHandler->getListData();
return $this->cObj->currentPageURL(
     array('preview_pi1[show_preview]' => $aRow['uid'])
);


Regards,
Jerome Schneider

Hauke Hain a écrit :
> Hello,
> 
> 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>
> [...]
> 
> It is possible to get the uid for AJAX events, but how can I reach my goal?
> 
> Regards,
> Hauke


More information about the TYPO3-project-formidable mailing list