Design

Conditional blocks

How to hide or show a part of your document?
COMMUNITY FEATURE Available for:
Carbone Cloud
Carbone On-premise
Embedded Carbone JS
  v2.0+ 

:showBegin / :showEnd

Show a text block between showBegin and showEnd if a condition is true.
It is recommended to only use break-lines (shift + enter) between showBegin and showEnd (learn more).

NEW: Use the drop/keep formatter if you are hiding a paragraph, table row, image, chart or shape.

data
{
  "toBuy" : true
}
template
Banana{d.toBuy:ifEQ(true):showBegin}ApplePineapple{d.toBuy:showEnd}Grapes
Carbone Merge Icon
result
BananaApplePineappleGrapes

:hideBegin / :hideEnd

Hide text block between hideBegin and hideEnd if a condition is true.
It is recommended to only use break-lines (shift + enter) between hideBegin and hideEnd (learn more).

NEW: Use the drop/keep formatter if you are removing a paragraph, table row, image, chart or shape.

data
{
  "toBuy" : true
}
template
Banana{d.toBuy:ifEQ(true):hideBegin}ApplePineapple{d.toBuy:hideEnd}Grapes
Carbone Merge Icon
result
BananaGrapes