MaxGalleryWidth for fluid_styled_content

自古美人都是妖i 提交于 2019-12-23 03:47:13

问题


I tried to change the MaxGalleryWidth in fluid_styled_content for an specific column.

First I tried how I do this before fluid_styled_content:

lib.contentRight = COA
lib.contentRight {
  10 = LOAD_REGISTER
  10 {
    maxImageWidth = 205
    maxImageWidthInText = 60
  }

  20 < styles.content.get
  20 {
    select {
      where = colPos=1
    }

    slide = -1
  }

  90 = RESTORE_REGISTER
}

Also using maxGalleryWidth in LOAD_REGISTER has no effect.

This doesn't work for me. Than I tried to set the maxGalleryWidth Parameter for the GalleryProcessor, but this seems not to have any effect:

lib.contentRight < styles.content.get
lib.contentRight {
  select {
    where = colPos=1
  }

  slide = -1

  renderObj = < tt_content
  renderObj.textmedia.dataProcessing.20 {
    maxGalleryWidth = 205
    maxGalleryWidthInText = 60
  }
}

Finaly I got it only to work with an override and if condition:

tt_content.textmedia.dataProcessing.20 {
  maxGalleryWidth.override.cObject = TEXT
  maxGalleryWidth.override.cObject {
    value = 205
    if {
      value = 1
      equals.field = colPos
    }
  }

  maxGalleryWidthInText.override.cObject = TEXT
  maxGalleryWidthInText.override.cObject {
    value = 60
    if {
      value = 1
      equals.field = colPos
    }
  }
}

For me it looks wrong, are there other ways to realize it correctly without using override?

来源:https://stackoverflow.com/questions/39663830/maxgallerywidth-for-fluid-styled-content

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