我迁移了一个wordpress网站,使用Yoast插件,到TYPO3和新闻文章的网址,只使用域名和标题;
## example
http://example.com/news-title/
user_encodeSpURL_postProc
和user_decodeSpURL_preProc
进行配置的诀窍,但是在那里我至少需要一个目录.有谁知道还有别的选择吗?
发布于 2018-04-03 04:33:19
我提出这个解决方案
1)跳过不需要的参数
通过使用以下设置
plugin.tx_news {
settings {
link {
skipControllerAndAction = 1
}
}
}
链接不再包括控制器和操作。我更喜欢使用这个,而不是删除它在现实中,因为减少魔法在现实。
( 2.)呈现主页上的单个视图
只是为了澄清:因为首页是第一页的意思。
[globalVar = GP:tx_news_pi1|news > 0] && [globalVar = TSFE:id = HOMEPAGE-ID]
lib.news = USER
lib.news {
userFunc = TYPO3\CMS\Extbase\Core\Bootstrap->run
pluginName = Pi1
vendorName = GeorgRinger
extensionName = News
controller = News
settings =< plugin.tx_news.settings
persistence =< plugin.tx_news.persistence
view =< plugin.tx_news.view
action = detail
switchableControllerActions.News.1 = detail
}
page.10 < lib.news
[end]
这只是一个概念的证明,因为最终的集成取决于如何呈现您的模板和内容。还可以删除page.10 < lib.news
并检查内容中的变量lib.news
,或者将其分配给变量并检查模板中的变量。
发布于 2018-04-01 05:52:49
结合.
您可以创建这样一个URL。但我建议不要使用起始页面,创建重定向到例如http://example.com/article/news-title/。
https://stackoverflow.com/questions/49597285
复制