使用fluid_styled_content(TS)为gridelement col内的图像设置maxImageWidth [英] Set maxImageWidth for images within gridelements col using fluid_styled_content (TS)

查看:26
本文介绍了使用fluid_styled_content(TS)为gridelement col内的图像设置maxImageWidth的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 TS 中定义自定义 gridelement 可以为在 col 内呈现的 texmedia 图像设置 maxImageSize.因此,在 50-50 的网格中,可以将最大图像宽度设置为常规最大宽度的 50%.

Defining a custom gridelement in TS one can setup the maxImageSize for an texmedia image rendered inside a col. So in a 50-50 grid one might set the max image width to 50% of the regular max.

columns {
  default {
    renderObj {
      10 = LOAD_REGISTER
      10.maxImageWidth = 273          
      30 = RESTORE_REGISTER
    }
  }
}

然而,使用fluid_styled_content 而不是css_styled_content 是行不通的.任何人都知道如何使用带有流体样式内容的网格元素进行配置?

However this is not working using fluid_styled_content instead of css_styled_content. Anyone knows how to configure that using gridelements with fluid_styled_content?

推荐答案

您的代码不起作用,因为fluid_styled_content textmedia 元素正在渲染画廊内的图像.如果您高于 Typo3 7.4,您可以使用 图库数据处理器:

Your code doesn´t work because the fluid_styled_content textmedia element is rendering the images inside a gallery. If you are above Typo3 7.4 you could use the Gallery Data Processor :

columns {
  default {
    renderObj {
      textmedia {
        dataProcessing {
          20.maxGalleryWidth = 273
          20.maxGalleryWidthInText = 273
        }
      }
    }
  }
}

这篇关于使用fluid_styled_content(TS)为gridelement col内的图像设置maxImageWidth的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆