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 images using TypoScript

All the content objects available can be created using TypoScript. We will look at the IMAGE content object. Despite its simplicity, there are various situations, in which it is useful. For example, you might need to render an image on several pages, but don't want to include it in the template because it is dynamic. Using TypoScript, you can use conditionals to control which image is rendered, wrap the image in a link, and more. Here, we will first create a simple image, and then see what other options can be given.

How to do it...

  1. Modify the template on any page.
  2. Add the following code to the setup field, substituting page.12 with the path to the object or marker where you want the image to appear:
    page.12 = IMAGE ...

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