Rendering audio and video using media TypoScript object
Let's now use TypoScript to perform the actions outlined in the recipe Rendering video using media content object. This is useful in cases when you want to include an object on several pages, and still be administrated in one place, or if the position in the template is strange, and content editors are unable to get to it using the Page module.
Getting ready
We will assume that you have the template for the site set up, and you have a marker in the template that you want to replace.
How to do it...
1. Edit the Template record.
2. Add the following lines to the
setup
field (modifying the path to the marker and path to the file):page.10.marks.VIDEO < tt_content.media.20 page.10.marks.VIDEO.file = fileadmin/movie.mpg page.10.marks.VIDEO.renderType = qt
3. Clear all cache and preview the page. The output should appear similar to the following screenshot:
How it works...
tt_content.media.20
is a TypoScript array that contains the definition...