vhs vimeo ViewHelper

时间:2016-11-18 11:24:36

标签: fluid typo3-7.6.x

在我的网站上,用户可以插入Vimeo URL,如下所示: https://vimeo.com/181873015 我想只提取最后一部分: 181873015 因为这是我需要的v:media.vimeo ViewHelper。所以我想我可以这样做:

<v:format.replace substring="https://vimeo.com/" content="{data.tx_extend_ttcontent_vimeo}" replacement="''" count="1">
</v:format.replace>

但我不知道如何获得结果。像这样:

<v:format.replace substring="https://vimeo.com/" content="{data.vimeo}" replacement="''" count="1" as="videoID">
</v:format.replace>

不起作用。

然后我想也许内联符号是正确的。所以我试过这个:

<v:media.vimeo videoId="{v:format.replace(substring: \'https://vimeo.com/\', content: \'{data.tx_extend_ttcontent_vimeo}\', replacement: '\'\'', count: 1)}" width="123" height="123" title="1" byline="1" portrait="1" color="'00adef'" autoplay="1" loop="1" api="1" playerId="NULL">
        </v:media.vimeo>

结果是:

<iframe src="//player.vimeo.com/video/{v:format.replace(substring: \'https://vimeo.com/\', content: \' https://vimeo.com/181873015\', replacement: '\'\'', count: 1)}?title=1&byline=1&portrait=1&color='00adef'&autoplay=1&loop=1&api=1&player_id=NULL" webkitallowfullscreen="webkitAllowFullScreen" mozallowfullscreen="mozAllowFullScreen" allowfullscreen="allowFullScreen" width="123" height="123" frameborder="0">

所以有人知道什么是正确的内联表示法或如何使用标签版本???

谢谢

贝恩德

0 个答案:

没有答案