问题描述
我有一个带有 TYPO3 v10 和 tx_news 的网站。我想知道是否可以使用 URL 中的参数过滤类别,例如:
watch: {
listDate (newValue) {
console.log("Render List");
let dateStamp = this.listDate.toLocaleDateString();
chrome.storage.sync.get([dateStamp],(result) => {
this.entries = Object.values(result[dateStamp]);
});
}
}
在本例中,链接将指向一个页面,其中所有新闻项目都属于类别 id=12。
感谢您的任何提示。
解决方法
是的,这可以通过以一种形式添加参数并传递给插件 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