[TYPO3-english] RealURL: news ID + title in the URL

Andy Pattynama andy.pattynama at gmail.com
Mon Nov 22 15:55:15 CET 2010


Hi there

I would like to achieve following URL for a tt_news single-view:
http://www.mysite.com/news-category/article/news-id/news-title/

The news-id & the news-title should be visible in the URL. My postVarsSet
looks like this at the moment:

                        'artikel' => array(

                                array (
                                        'GETvar' => 'tx_ttnews[tt_news]',
                                        'lookUpTable' => array (
                                                'table' => 'tt_news',
                                                'id_field' => 'uid',
                                                'alias_field' => 'title',
                                                'addWhereClause'=> 'AND NOT
deleted',
                                                'useUniqueCache'=> 1,
                                                'useUniqueCache_conf' =>
array (
                                                        'strtolower' => 1,
                                                        'spaceCharacter' =>
'-',
                                                ),
                                        ),
                                ),

                        ),

I also tried the following:
 'artikel' => array(
                               array (
                                        'GETvar' => 'tx_ttnews[tt_news]',
                                        'lookUpTable' => array (
                                                'table' => 'tt_news',
                                                'id_field' => 'uid',
                                                'alias_field' => 'uid',
                                                'addWhereClause'=> 'AND NOT
deleted',
                                                'useUniqueCache'=> 1,
                                                'useUniqueCache_conf' =>
array (
                                                        'strtolower' => 1,
                                                        'spaceCharacter' =>
'-',
                                                ),
                                        ),
                                ),
                                array (
                                        'GETvar' => 'tx_ttnews[tt_news]',
                                        'lookUpTable' => array (
                                                'table' => 'tt_news',
                                                'id_field' => 'uid',
                                                'alias_field' => 'title',
                                                'addWhereClause'=> 'AND NOT
deleted',
                                                'useUniqueCache'=> 1,
                                                'useUniqueCache_conf' =>
array (
                                                        'strtolower' => 1,
                                                        'spaceCharacter' =>
'-',
                                                ),
                                        ),
                                ),

                        ),
but that didn't work.

It looks like that once the GETvar 'tx_ttnews[tt_news]' has been 'used',
it's not possible to use it again. Is there maybe another workaround to
achieve the URLs?

Thanks in advance.

Best regards,
Andy


More information about the TYPO3-english mailing list