Set Attributes - nomadjimbob/mikioplugin GitHub Wiki
Mikio Plugin has a special element named setattr
that can be used on a page, allowing the reuse of common attributes across several other elements using the attr
attribute with a value of the name of the setattr
.
<setattr name=mybox border-width=1px border-color=green>
<setattr name=otherbox border-width=2px border-color=blue>
The above sets elements that have the attribute attr=mybox
to have the attributes border-width=1px
and border-color=green
while elements that have the attribute attr=otherbox
to have the attributes border-width=2px
and border-color=blue
<box attr=mybox>The box</box>
<box attr=otherbox>The box 2</box>
<box attr=mybox>The box 3</box>
<box attr=otherbox>The box 4</box>