Created
June 13, 2013 13:11
-
-
Save Plou/5773534 to your computer and use it in GitHub Desktop.
Use multiple item flexform in flex using wec_content_element API
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tt_content.flex = COA | |
tt_content.flex { | |
# render a field from the flexform | |
10 = TEXT | |
10 { | |
data = t3datastructure : pi_flexform->titleField | |
} | |
# output each image in the flex. | |
20 = FFSECTION | |
20 { | |
#declare which el from the flexform to render | |
rootPath = t3datastructure : pi_flexform->images/el | |
10 = COA | |
10{ | |
# wrap images with content uid and then item index. | |
# if the tt_content id is 123 and that the third displayed image : "c123_3" | |
wrap = <div id="c{field:uid}_{register:FFSECTION_COUNTER}" class="item" >|</div> | |
wrap.insertData = 1 | |
10 = IMAGE | |
10 { | |
file.import.data = flexformSection : image/el/file | |
file.import.wrap = uploads/skinFlex/timeline/ | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment