You need to sign in to do that
Don't have an account?
Starhunter
How can I use render condition inside html class
Is it possible to use render condition inside html class. Intention is to conditionally alter the bootstrap column class
<div class="form-group col-md-3">
Can the above be converted into something like :
<div class = {!IF(!isCondition,"form-group col-md-3","form-group col-xs-3")}">
Of course the rendering can be done by including two different div block(one for md-3 and other for xs-3).But am curious to know if the same can be achieved via one div block.
<div class="form-group col-md-3">
Can the above be converted into something like :
<div class = {!IF(!isCondition,"form-group col-md-3","form-group col-xs-3")}">
Of course the rendering can be done by including two different div block(one for md-3 and other for xs-3).But am curious to know if the same can be achieved via one div block.
However, in your example, you have a conditional class in your div, which should work ok once the syntax is fixed. You're essentially saying that "If this condition is met, I want to apply the col-md-3 class, otherwise, I want to apply the col-xs-3 class". This isn't "rendering" per se, but will impact the styling of your div.
I fixed your div example above to be syntactically correct (I think, I havent tested it out mind you):
All Answers
However, in your example, you have a conditional class in your div, which should work ok once the syntax is fixed. You're essentially saying that "If this condition is met, I want to apply the col-md-3 class, otherwise, I want to apply the col-xs-3 class". This isn't "rendering" per se, but will impact the styling of your div.
I fixed your div example above to be syntactically correct (I think, I havent tested it out mind you):