Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/typo3/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Typo3 如何使用RealUrl从tx_新闻详细信息视图中缩短url?_Typo3_Tx News - Fatal编程技术网

Typo3 如何使用RealUrl从tx_新闻详细信息视图中缩短url?

Typo3 如何使用RealUrl从tx_新闻详细信息视图中缩短url?,typo3,tx-news,Typo3,Tx News,我喜欢打字3:1000条通往罗马的路 以下是我在TYPO3 7.6和tx_news 5.2上的尝试,提供了很好的Url详细视图: 如何将url从“detail/”缩短 谢谢你的提示 第一条“罗马之路”: 第二: [globalVar = GP:tx_news_pi1|news > 0] config.defaultGetVars { tx_news_pi1 { controller=News action=detail } } [global

我喜欢打字3:1000条通往罗马的路

以下是我在TYPO3 7.6和tx_news 5.2上的尝试,提供了很好的Url详细视图:

如何将url从“detail/”缩短

谢谢你的提示

第一条“罗马之路”:

第二:

[globalVar = GP:tx_news_pi1|news > 0]
  config.defaultGetVars {
    tx_news_pi1 {
      controller=News
      action=detail
    }
  }
[global]
文件:


缩短URL的另一种方法:

在realURLconfiguration文件中使用以下编码和解码函数:

  • 'encodeSpURL\u postProc'=>数组('user\u encodeSpURL\u postProc'),
    • 函数用户\u encodeSpURL\u postProc(&$params,&$ref){
      $params['URL']=str_replace('News/Details/'、'News/'、$params['URL']); }
  • 'decodeSpURL\u preProc'=>数组('user\u decodeSpURL\u preProc')

    • 函数用户\u decodeSpURL\u预处理(&$params,&$ref){
      $params['URL']=str_replace('News/'、'News/Details/'、$params['URL']); }

Hi@rob ot Danke für den Tipp,这是我的学校设置,trotzdem是我的Url文件夹:https://....org/artikel/detail/News/new-editions-in-english-language/. Geht das noch mehr kürzen?您可以使用uid而不是标题来查找要显示的新闻,您可以使用相同的页面/插件来列出新闻并通过根据get参数切换控制器操作组合来显示单个视图(文档中有一个示例)@HelmutWinkelbach请将您的评论翻译成英语。你好@rob ot谢谢您的提示,我已经在设置中了,我的url如下:https://…org/artikel/detail/News/英语版-这可以缩短吗?
[globalVar = GP:tx_news_pi1|news > 0]
  config.defaultGetVars {
    tx_news_pi1 {
      controller=News
      action=detail
    }
  }
[global]