[TYPO3-english] RealURL & tt_news: Possible to have tt_news_uid and tt_news_title in the URL?

Andy Pattynama andy.pattynama at gmail.com
Wed Jun 16 22:08:29 CEST 2010


On Wed, Jun 16, 2010 at 9:32 PM, Dmitry Dulepov
<dmitry.dulepov at gmail.com> wrote:
> Hi!
>
> Andy Pattynama wrote:
>>> Try:
>>>
>>>> 'show' => array(
>>>                                array (
>>>                                   'GETvar' => 'tx_ttnews[tt_news]',
>>>                                ),
>> I added that part too but then, the URLs look like this:
>> http://www.domain.com/show/{tt_news_uid}/
>>
>> I just tried following:
>> $_GET["tx_ttnews"]["tt_news2"] = $_GET["tx_ttnews"]["tt_news2"];
>>
>> and then, in the postvars:
>>  'show' => array(
>>                                 array (
>>                                         'GETvar' =>
>> 'tx_ttnews[tt_news2]',
>>                                 ),
>
> Please, compare what I told you to do and what you did. Just do what I told
> to do. There is no need to invent anything else because it will be wrong.

Sorry, I wasn't clear before. I added your line and that didn't work
out. Here is what I did:
'show' => array(
                                array (
                                        'GETvar' =>
'tx_ttnews[tt_news]',
                                ),
                                array (
                                        'GETvar' => 'tx_ttnews[tt_news]',
                                        'lookUpTable' => array (
                                                'table' => 'tt_news',
                                                'id_field' => 'uid',
                                                'alias_field' => 'title',
                                                'maxLength' => 50,
                                                'addWhereClause'=>
'AND NOT deleted',
                                                'useUniqueCache'=> 1,
                                                'useUniqueCache_conf' => array (
                                                        'strtolower' => 1,
                                                        'spaceCharacter' => '-',
                                                ),
                                        ),
                                ),
                        ),

That generates URL like this:
http://www.domain.com/show/{tt_news_uid}/
(missing title)

That's why I tried an alternative way but that didn't work out either.

Thanks again,
Andy


More information about the TYPO3-english mailing list