Skip to content

Instantly share code, notes, and snippets.

@benjaminrau
Created March 31, 2014 16:25
Show Gist options
  • Save benjaminrau/9896177 to your computer and use it in GitHub Desktop.
Save benjaminrau/9896177 to your computer and use it in GitHub Desktop.
Access Media Files related to TYPO3 pages / FAL on page properties
{v:resource.record.fal(record: page, field: 'media', table: 'pages') -> v:iterator.extract(key: 'id') -> v:iterator.first() -> v:var.set(name: 'pageMedia')}
<f:if condition="{pageMedia}">
<v:page.header.meta name="og:image" content="{f:uri.image(src: pageMedia, treatIdAsReference: 1) -> v:format.prepend(add: '{v:page.siteUrl() -> v:format.substring(length: \'-1\')}')}" />
</f:if>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment