0

I tried to create a typo3 template with a special div-tag. The editors should have the possibility to add images to the page-element. The goal should be the following code:

<div id="special_div_tag_in_template">
    <img src="first_image_from_editor_in_page_element.png" />
    <img src="second_image_from_editor_in_page_element.png" />
    <img src="third_image_from_editor_in_page_element.png" />
</div> 

Is there a possibility to create a custom element preset / form field?

I hope some one has a hint how to solve with this problem. Thanks, Andreas

1 Answer 1

1

You can use the media field of the page properties:

lib.headerImage = COA
lib.headerImage {
    wrap = <div id="special_div_tag_in_template">|</div>
    10 = IMAGE
    10 {
        file {
            import = uploads/media/
            import {
                field = media
                listNum = 0
            }
            // set the dimensions if you want
            height = 200
            width = 100m
        }
    }

    // create a copy and select 2nd image
    20 < .10
    20.file.import.listNum = 1

    // create a copy and select 3rd image
    30 < .10
    30.file.import.listNum = 2
}

Take a look at the TYPO3 Wiki for more examples of header images.

A different approach would be to create DS/TO in TemplaVoila and insert this as a flexible content element (FCE)

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.