1

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?

René Pflamm
  • 3,273
  • 17
  • 29
  • The solution with override isn't that bad. Can you try to eliminate the styles.content.get from the second solution? It's only a few lines that are in that construction. – Jigal van Hemert Sep 24 '16 at 20:18
  • Elimating the ```styles.content.get``` has no effect. Still the same. I think the current solution works for this simple example, but what when I also want to check for a backend_layout or something else. It would be complicated. And what is if the colPos 1 is on other templates bigger and I used in fluid another lib for it... – René Pflamm Sep 26 '16 at 10:08
  • In many situations you can simply let CSS take care of the precise sizes. For more complex situations a custom dataProcessor would be the best solution. – Jigal van Hemert Sep 27 '16 at 16:21
  • In my example the customer want two pictures aside on the right column and don't want to calculate how the size of each image should be. So CSS isn't the solution for me. – René Pflamm Sep 27 '16 at 16:24

0 Answers0