Set maxImageWidth for images within gridelements col using fluid_styled_content (TS)

和自甴很熟 提交于 2021-02-11 09:07:44

问题


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
    }
  }
}

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?


回答1:


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
        }
      }
    }
  }
}


来源:https://stackoverflow.com/questions/42088137/set-maximagewidth-for-images-within-gridelements-col-using-fluid-styled-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!