Configuration of the Extension:
DAM Media Field: If this is set, the Media Field of the page object will be replaced by a DAM-Media-Field
Original Media Field: If this is set, the original media field will also be displayed. Can be used for migration to the new media field.
Media Field in Pages Type Shortcut: If this is set, the media fields will also be displayed in pages with the type Shortcut
- Reference (TypoScript)
Property: | Data type: | Description: | Default: |
|---|---|---|---|
listNum | integer | Declares which one of the media-files, out of the list, to output. If not set the first entry will be returned. If set to 1, the second entry will be returned, if set to 2 the third etc | 0 |
slide | boolean | Enables the searching for a first entry (if no file is stated) upwards the rootline. If not set, only files stated in the actual page object are returned. Usage e.g. For chapter images etc | 0 |
defaultFile | string | If no result is found and defaultFile is set, the defaultFile value will be returned | 0 |
random | integer | If random is not set, the output will be normal (controlled by listNum). If random is set to 1, a random file out of the media-files field is given back. All files in the media-field are used for the pool of the random draw (the listNum value is neglected). If random is set to a value bigger than 1, the pool for the random draw starts at this position, thus enabling to protect the first n-1 files from being used in the random output, e.g. when the first position is used for a logo. So if random is set to 3, then the two first entries will not be considered for the random draw, but all the files upwards the second one will be used for it. If using the random functionality: If on every call at a page a new random file is expected, don't forget to make the object non-cachable! | 0 |
Example
Typoscript Code for usage of a chapter-image in a Templavoila Environment:
lib.page_image = IMAGE
lib.page_image { file {import.cObject = USER
import.cObject {userFunc = tx_dam_pages->get_media_file
listNum=0
slide = 1
}
}
}
or
lib.page_image = USER
lib.page_image {userFunc = tx_dam_pages->get_media_file_into_marker
listNum=0
slide = 1
renderObj = COA
renderObj {10 = IMAGE
10 {file = ###FILE###
}
}
}