- Get link
- Other Apps
b:class
The b:class tag, or the class tag, is a tag for simplifying adding a class to the parent element, especially conditionally.
Attributes
name - Name of the class.
cond - Boolean expression for whether to add the class.
Example usage
<div class='foo'>
<b:class name='bar' cond='data:view.isHomepage' />
</div>
On homepages, this would produce
<div class='foo bar'>
</div>
On other pages, this would produce
<div class='foo'>
</div>