【问题标题】:TYPO3: filter tx_news categories by arguments in the URLTYPO3:通过 URL 中的参数过滤 tx_news 类别
【发布时间】:2021-07-21 03:58:34
【问题描述】:

我有一个带有 TYPO3 v10 和 tx_news 的网站。我想知道是否可以使用 URL 中的参数过滤类别,例如:

 www.mywebsite.com/index.php?id=9&tx_news_pi1%5Bnews%5D=350&tx_news_pi1%5Bcontroller%5D=News&tx_news_pi1%5Baction%5D=list&categories=12

在本例中,链接将指向一个页面,其中所有新闻项目都属于类别 id=12。

感谢任何提示。

【问题讨论】:

    标签: typo3 tx-news typo3-10.x


    【解决方案1】:

    是的,这可以通过将参数添加到将其移交给插件 extbase 控制器的形式来实现。对于 tx_news,您要求的参数如下所示:

    &tx_news_pi1[overwriteDemand][categories]=12
    

    您甚至可以通过在您的站点中使用 RouteEhancers 使参数更短、更易读:https://docs.typo3.org/p/georgringer/news/8.5/en-us/AdministratorManual/BestPractice/Routing/Index.html

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-04-28
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多