DEPRECATION WARNING

This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.

DAM for Content Elements

Author:Kasper Skårhøj
Created:2002-11-01T00:32:00
Changed by:Lorenz Ulrich
Changed:2012-07-20T22:19:14.810000000
Author:The DAM development team
Email:typo3-project-dam@lists.netfielders.de
Info 3:
Info 4:

DAM for Content Elements

Extension Key: dam_ttcontent

Copyright 2003-2012, The DAM development team, <typo3-project- dam@lists.netfielders.de>

This document is published under the Open Content License

available from http://www.opencontent.org/opl.shtml

The content of this document is related to TYPO3

- a GNU/GPL CMS/Framework available from www.typo3.com

Table of Contents

DAM for Content Elements 1

Introduction 1

Installation 1

Reference usage 1

Captions 2

Introduction

This extension provides some functionality for the default content elements (tt_content). While generally new content elements should be developed to support the DAM features, this extension can help to use a few features of DAM with the default content elements.

Installation

The extension manager shows several options during installation. All options should be self explanatory. For more informations of the provided functionality have a look in the following sections.

Reference usage

The DAM system allows to use file references instead of the normal copy mechanism TYPO3 uses to bind files to content elements. The extension Content/DAM reference usage (dam_ttcontent) is an example for that functionality.

The extension provide the reference functionality for image files for the content elements Image and Text w/image . This is done by adding a field to these elements that allow to insert images as reference.

img-1 For frontend rendering this extension just add some TypoScript to the content elements rendering setup which passes the filenames to the rendering code.

Administration

The extension just add a field in TCA and add some TypoScript setup to fetch the filenames for that field and pass it to the TS rendering setup. The rendering itself is not done by this extension. Therefore the principle can be adopted to all other content elements or plugin records.

Important: When you use another extension which changes/replaces the image rendering already this solution might break the rendering so you have to adopt the TypoScript setup for the rendering setup.

See ext_localconf.php for a functionality sample.

Captions

When css_styled_content is used for rendering, this extension can change the rendering so caption and alt text's can be fetched from DAM for the content elements Image and Text w/image. The option 'Alternative CSS Styled Rendering' needs to be enabled while extension installation to activate this function.

The default behavior is changed a little bit to provide such a functionality. Normally caption rendering don't have to be activated, because no caption will be rendered when no content is set (the caption field is empty). With DAM there's almost always a caption, so an option to disable caption rendering is needed. This is done by extending the Align field with the option Hidden . To make this option more visible the Align field, as secondary option, is configured to be visible always now. The fields for caption, alternative text and title text can be used to set default values which will be displayed for an item if no data is available from DAM.

img-2 Administration

To enable the rendering with DAM data the static template 'DAM: CSS Styled Content' needs to be activated in a template record.

The TypoScript setup from this template has following behavior:

  • If “DAM images, captions” is activated in the Constant Editor, each image has the value of the DAM caption field with fallback to the DAM description field as caption.
  • If “DAM images, captions” is disabled, the value from the Captions field in the content record is used – one line per image.

This is configured by TypoScript an can be overridden. See pi_cssstyledcontent/setup.txt for the defaults.

img-3 DAM for Content Elements - 3