繁体   English   中英

TYPO3-Extbase SEO提示

[英]TYPO3 - Extbase SEO Urls

我开发了一个扩展,该扩展大量使用REST数据源,而且typo3 DB中没有本地表。 不知道,URL并不是真正可读的。

所以我现在要做的是:

在我的rootline中,我有一个包含我的插件的页面,并且我想拥有这样的url结构:

www.example.com/category-title-1/seo-friendly-poduct-name.html

对不同网址部分的一些解释:

[category-title-1] => This is a dynamic part from the Webservice and i don't know them in advance
[seo-friendly-poduct-name] => This comes from the Webservice to.
[.html] => filename ending

我已经阅读了很多RealUrl,并看到了一些有关查找表的信息,等等。 但是由于我没有本地查询表,所以我不能使用它。

网址结构一般是否可以实现?

有人可以解释一下实现此目标的最佳方法是什么吗?

您不仅可以使用自己的查找表,还可以使用用户定义的函数:

...
'fixedPostVars' => array(
    // your extension parameter identifier
    'yourParamIdentifier' => array(
        array(
            'GETvar'   => 'tx_yourextension_plugin[parameter]',
            'userFunc' => 'EXT:yourextension/pi1/class.tx_yourextension_realurl.php:&tx_yourextension_realurl->handleRealURLCoding',
        )
    ),
    // set the page id with your plugin to paramater identifier to hide the page segment from url
    123 => 'yourParamIdentifier', 
),
...

在handleRealURLCoding方法中,无需任何表即可处理自己的realurl规则。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM