Enable / disable CSS attributes on HTML elements conditionally

Search
Feedback

You can use the built-in if() expression to control CSS attributes in HTML elements:

fig

If the condition does not apply, the special value null can be used to prevent the rendering of an empty class="" attribute in the HTML output.

Graph-Browser

About this article
Last change 2017-05-04
Topics FrontendFunctionsStructr 2.0