Norman
Norman

Reputation: 805

TYPO3: Crop images for just one variable

I'm having something like

page.10.variables {
    content < styles.content.get
    content.stdWrap.wrap = <div class="content">|</div>
    content.select.where = colPos = 0

    teaser < styles.content.get
    teaser.select.where = colPos = 4
    teaser.stdWrap.wrap = <div class="teaser">|</div>
    teaser.stdWrap.required = 1
}

And I wish to crop the images inside the {teaser} while leaving the images inside the {content} uncropped.
How to manage this?

I'm currently running T3 7.4 but I'm also working on upgrading it to 7.6.2

Upvotes: 1

Views: 105

Answers (1)

ESP32
ESP32

Reputation: 8713

You can set different image sizes per column like this:

temp.tt_content.image < tt_content.image
tt_content.image = CASE
tt_content.image {
key.field=colPos
    1 < temp.tt_content.image
    2 < temp.tt_content.image
    3 < temp.tt_content.image
    default < temp.tt_content.image
    1.20.width= 145c #col-02
    2.20.width= 190c #col-04
    3.20.width= 100c
    1.20.height= 145c #col-02
    2.20.height= 190c #col-04
    3.20.height= 100c
    default.20.maxW= 345
}
temp.tt_content.image >

Upvotes: 1

Related Questions