O'Reilly logo

TYPO3 4.3 Multimedia Cookbook by Dan Osipov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Rendering metadata from a DAM object

We'll use some very basic TypoScript and see how metadata stored in DAM records can be rendered on a page, along with the media objects, or even in them. This is commonly used for inserting accessibility tags (alt and title) into images.

How to do it...

  1. Create a Template on the page.
  2. In the setup field, add the following, replacing page.17 with a path to the object you want to place the content in, and replacing 1234 with the UID for a DAM record, whose caption you would like to display:
    page.17 = TEXT page.17.data = DB:tx_dam:1234:caption
    
  3. Save and preview.

How it works...

Data property is available wherever stdWrap is applied. So, you can display any of the metadata available in the DAM record, almost anywhere. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required