Question

I try to set the max image size for a specific content element. How can I do this for the element "content"? I tried to combine several options, but nothing works.
Is the content.maxImageWidthInText.maxH the right way?

Here is my code:

page = PAGE
page {
    typeNum = 0            
    10 = FLUIDTEMPLATE
    10 {

      file.stdWrap.cObject = CASE
      file.stdWrap.cObject {

        key.data = levelfield:-1, backend_layout_next_level, slide
        key.override.field = backend_layout

        default = TEXT
        default.value = fileadmin/templates/index.html

        1 = TEXT
        1.value = fileadmin/templates/index.html    

      }  

      variables {

        # Content
        content < styles.content.get
        content.select.where = colPos=0
        content.maxImageWidthInText.maxW = 135                          
        .....
      }
    }
}
Was it helpful?

Solution

There are the registers maxImageWidth and maxImageWidthInText to do that:

content = COA
content {
    10 = LOAD_REGISTER
    10 {
        maxImageWidth = 135
        maxImageWidthInText = 100
    }

    20 < styles.content.get

    30 = RESTORE_REGISTER
}

Couldn't find any official documentation though - you can find this stuff using the TypoScript object browser.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top