user500665
user500665

Reputation: 1362

TYPO3 content row wrap

In typoscript I can wrap a column when it has content using something like this:

styles.content.getMyColumn < styles.content.get
styles.content.getMyColumn.select.where = colPos = 0     
styles.content.getMyColumn.stdWrap {
  wrap = <div>|</div>
  required = 1
}

I want to do a similar thing but instead wrap the whole row the column is in. Does anyone know how to this?

Upvotes: 1

Views: 182

Answers (1)

Patrick Broens
Patrick Broens

Reputation: 66

It is depending on your TypoScript/Template setup.

A way to do it in TS is:

page = PAGE
page {
    # Row 1
    10 = COA
    10 {
        # Column 1
        10 < styles.content.get
        10.select.where = colPos = 0 
        10.wrap = <div class="row1-column1">|</div>

        # Column 2
        20 < styles.content.get
        20.select.where = colPos = 2 
        20.wrap = <div class="row1-column2">|</div>

        # Wrap the row
        wrap = <div class="row1">|</div>
    }
}

A better approach is to use FLUIDTEMPLATE for the whole page and separate the markup from the TypoScript. This makes it more readable because the whole HTML markup is in your HTML template file.

Upvotes: 2

Related Questions