2

The 3 columns in my backendlayout should be equal size, independent of their content. In my case their width get determined by their content though. Glad about any hints!

Environment:

  • TYPO3 8.7.0

  • PHP 7.0.13

  • MySQL 5.6.34

Installed Extensions:

  • gridelements dev-master c5120b0e

  • realurl 2.2.0

  • slickcarousel 8.x-dev

  • vhs 4.1.0

The TS was generated using the wizard. It is a 3 columns layout with 2 rows. The second row has 3 cols (colspan = 1) and the first one has 1 col (colspan = 3).

mod.web_layout.BackendLayouts {
MainTemplate {
    title = MainTemplate
    name = MainTemplate
    icon = EXT:amtemplate/ext_icon.png
    config {
        backend_layout {
            colCount = 6
            rowCount = 2
            rows {
                1 {
                    columns {
                        1 {
                            name = LLL:EXT:amtemplate/Resources/Private/Language/locallang.xlf:amtemplate_be_layout_maintemplate.sliderarea
                            colPos = 1
                            colspan = 6
                        }
                    }
                }
                2 {
                    columns {
                        1 {
                            name = LLL:EXT:amtemplate/Resources/Private/Language/locallang.xlf:amtemplate_be_layout_maintemplate.left
                            colPos = 2
                            colspan = 2
                        }
                        2 {
                            name = LLL:EXT:amtemplate/Resources/Private/Language/locallang.xlf:amtemplate_be_layout_maintemplate.main_content
                            colPos = 0
                            colspan = 2
                        }
                        3 {
                            name = LLL:EXT:amtemplate/Resources/Private/Language/locallang.xlf:amtemplate_be_layout_maintemplate.right
                            colPos = 3
                            colspan = 2
                        }
                    }
                }
            }
        }
    }
}
}

2 Answers2

0

Worked here in 8.7.1 without any problems. Maybe you wann update to the latest release?

  • Thanks for the answer, just updated but it didnt solve the issue. I did find the issue though: gridelements. Unfortunately i cannot tell why exactly my layouts dont work, but disabling gridelements solved my problems. – jonaskoneczny Apr 24 '17 at 09:36
0

There are two different concepts you are mixing up here, namely colspan and width.

The colspan attribute is used to tell a cell of a table how many of the other cells of another row it should overlap. So this has nothing to do with fixed widths even though it might feel like that, when you got the same content in each cell or no content at all. As soon as you fill the table cells with different content, the width of each cell might differ even though some of these cells might use the same colspan value.

So colspan actually just defines the relation between the cells but not their width. Still the core somehow circumvents that behaviour by applying min and max width values to several parts of the page module via CSS, so the cells will stay within a certain width range.

Now that you have installed gridelements, there can not be such a range anymore, because there might be nested grid structures that have to consume way more space. So gridelements uses a CSS removing that range and thereby restores the default behaviour of HTML table cells.

Jo Hasenau
  • 2,526
  • 1
  • 14
  • 16
  • I understand the reason, but can't there be made another solution than equalise all column widths? I think different columns widths in the backend which reflect the frontend proportions is very nice. – Jacco van der Post Nov 24 '17 at 14:15