TYPO3 tx_news: How to remove “news” prefix from Re

2019-08-03 23:24发布

I have a problem. Does anybody know how to get rid of the news prefix from url ?

it is like this

http://www.example.com/**news**/detail/title-of-news/

and I would like to be like this

http://www.example.com/detail/title-of-news/

Or replace news word with diffrent "article" for example.

1条回答
仙女界的扛把子
2楼-- · 2019-08-03 23:41
  1. place single view plugin on separate article page
  2. Use fixedPostVars (from RealURL docs) to shorten the url, read this answer to see the sample for tt_news (sorry I haven't now any sample for News + RU, but there's no problem with tuning this):

Sample:

'fixedPostVars' => array(
    '123' =>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' => '-',
                ),
            ),
        ),
    ),
),
查看更多
登录 后发表回答