简体   繁体   English

TYPO3-Extbase SEO提示

[英]TYPO3 - Extbase SEO Urls

I developed an extension which heavily uses a REST Data Source and i have no local tables in typo3 DB. 我开发了一个扩展,该扩展大量使用REST数据源,而且typo3 DB中没有本地表。 No it is known that the urls are not really human readable. 不知道,URL并不是真正可读的。

So what i want now to do is this: 所以我现在要做的是:

In my rootline i have a page which includes my plugin and i want to have a url structure like this: 在我的rootline中,我有一个包含我的插件的页面,并且我想拥有这样的url结构:

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

Some explanation to the different url parts: 对不同网址部分的一些解释:

[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

I've read a lot of RealUrl and saw something about lookup tables and so on. 我已经阅读了很多RealUrl,并看到了一些有关查找表的信息,等等。 But as i have noch local lookup tables i can't use that. 但是由于我没有本地查询表,所以我不能使用它。

Is the wished url structure generally achievable? 网址结构一般是否可以实现?

Can somebody try to explain what would be the best way to achieve this ? 有人可以解释一下实现此目标的最佳方法是什么吗?

You can not only use your own lookup tables but also user defined functions: 您不仅可以使用自己的查找表,还可以使用用户定义的函数:

...
'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', 
),
...

In the method handleRealURLCoding you can handle your own realurl rules without having any table. 在handleRealURLCoding方法中,无需任何表即可处理自己的realurl规则。

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

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