TYPO3 tx_news:如何从RealURL路径中删除“新闻"前缀 [英] TYPO3 tx_news: How to remove “news” prefix from RealURL path

查看:113
本文介绍了TYPO3 tx_news:如何从RealURL路径中删除“新闻"前缀的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题.有人知道如何摆脱url中的新闻前缀吗?

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

就是这样

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

我想成为这样

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

或者用不同的文章"替换新闻词.

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

推荐答案

  1. 将单视图插件放在单独的article页面上
  2. 使用fixedPostVars(来自RealURL文档)缩短网址,阅读此答案以查看tt_news(对不起,我现在没有News + RU的任何示例,但是对此进行调整没有问题):
  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):

示例:

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

这篇关于TYPO3 tx_news:如何从RealURL路径中删除“新闻"前缀的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆