TYPO3 tx_news: How to remove “news” prefix from RealURL path

删除回忆录丶 提交于 2019-12-11 12:23:04

问题


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:


  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' => '-',
                ),
            ),
        ),
    ),
),


来源:https://stackoverflow.com/questions/25238739/typo3-tx-news-how-to-remove-news-prefix-from-realurl-path

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!