[TYPO3-UG Dutch] RealUrl overschrijft Id uit piVars

Stef Vossen stef.vossen at gmail.com
Mon Aug 9 12:36:59 CEST 2010


Als ik de volgende url config gebruik:

'optreden' => array(
    array(
        'GETvar' => 'tx_svgigs_pi1[sv_gigs]',
        'lookUpTable' => array(
            'table' => 'tx_svgigs_gig',
            'id_field' => 'uid',
            'alias_field' => 'from_unixtime(date,\'%d-%m-%Y\')',

            'addWhereClause' => ' AND NOT deleted',
            'useUniqueCache' => 1,
            'useUniqueCache_conf' => array(
                'strtolower' => 1,
                'spaceCharacter' => '-',
            ),
        ),
    ),
),

werkt het wel en is $this->piVars['showUid'] gevuld met de id van het
huidige record.

Maar ik wil graag uit een andere tabel de artiestnaam ophalen ivm goede SEO
URLs. Hiervoor gebruik ik de volgende config:

'optreden' => array(
    array(
        'GETvar' => 'tx_svgigs_pi1[sv_gigs]',
        'lookUpTable' => array(
            'table' => 'tx_svgigs_gig G JOIN tx_svgigs_artist A ON
G.artistid = A.uid',
            'id_field' => 'G.uid',
            'alias_field' =>
'CONCAT(from_unixtime(G.date,\'%d-%M-%Y\'),\'-\',A.name)',

            'addWhereClause' => ' AND NOT G.deleted',
            'useUniqueCache' => 1,
            'useUniqueCache_conf' => array(
                'strtolower' => 1,
                'spaceCharacter' => '-',
            ),
        ),
    ),
),

Op dat moment wordt $this->piVars['showUid'] gevuld met de nieuwe URL ipv de
id.

Zoals je ziet gebruik ik in de 2e config een join. Ik heb geen idee of dit
uberhaupt mogelijk is icm RealURL. De nieuwe url klopt iig wel, deze wordt
bijvoorbeeld 01-januari-2010-voornaam-achternaam.



Op 9 augustus 2010 10:42 schreef Michiel Roos [netcreators] <
michiel at netcreators.com> het volgende:

> Dag Stef,
>
> Het zou helpen als je het stukje code plakt waarin je de id probeert op
> te halen en ook je realurl config.
>
> --
> Met vriendelijke groet / Warm regards,
>
> Michiel Roos
> Chief Technical Officer
> Netcreators: Open Source, Open Minds, Open People
> _______________________________________________
> TYPO3-UG-Dutch mailing list
> TYPO3-UG-Dutch at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-ug-dutch
>


More information about the TYPO3-UG-Dutch mailing list