[TYPO3-german] vhs ViewHelper vimeo und replace

Bernd Pier macbepepi at me.com
Mon Nov 21 11:17:04 CET 2016


Hallo liebe Liste,

ich habe im BE ein Feld das die URL zu einem Vimeo Video hält, sowas wie 
https://vimeo.com/123456

Nun möchte ich gerne in meinem Fluid Template mit dem ViewHelper 
v:media.vimeo das Video ausgeben. Der ViewHelper braucht allerdings nur 
die ID des Videos, also den letzen Teil.
Da dachte ich mir, nimm doch den ViewHelper v:format.replace und 
extrahiere dir den Teil.

Leider klappt das bei mir nicht.

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

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

3. Versuch
<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>

1. + 2. gibt mir die ID in der Webseite aus aber rendert mir nicht den 
Videoteil

3. rendert mir das iframe allerdings wird die VideoID nicht geholt.

Geht das was ich will überhaupt?

Danke für eure Hilfe.

Bernd


More information about the TYPO3-german mailing list