ggzone
ggzone

Reputation: 3711

how to hide a marker or content parts if no content in typo3

i got a template with a marker ###whatever### its set as TEXT and filled with .value i need to hide or empty the marker IF one of the columns are empty (in my case the normal column colPos=0)

Upvotes: 0

Views: 1662

Answers (1)

tmt
tmt

Reputation: 8634

This is a condition preventing the display of the marker's data if there's no content in the normal (colPos=0) column.

YOUR_MARKER = TEXT
YOUR_MARKER {
  # ...your definitions...

  # Check whether there's any content in the column 0
  if.isTrue.cObject = CONTENT
  if.isTrue.cObject {
    table = tt_content
    select {
      where = colPos=0
    }    
    renderObj < tt_content
  }
}

YOUR_MARKER obviously has to be the correct path, e.g. page.10.subparts.YOUR_MARKER.

Upvotes: 3

Related Questions