【问题标题】:TYPO3: Crop images for just one variableTYPO3:只为一个变量裁剪图像
【发布时间】:2016-02-16 09:44:47
【问题描述】:

我有类似的东西

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
}

我希望裁剪{teaser} 中的图像,同时保留{content} 中的图像未裁剪。
如何管理?

我目前正在运行 T3 7.4,但我也在努力将其升级到 7.6.2

【问题讨论】:

    标签: typo3 crop typoscript


    【解决方案1】:

    您可以像这样为每列设置不同的图像大小:

    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 >
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-10-10
      • 2017-05-22
      • 1970-01-01
      • 2019-03-25
      • 2011-03-24
      相关资源
      最近更新 更多