- 3.8. OPT attributes
3.8.9. opt:selector - 3.8.8. opt:section
« Previous - 3.8.10. opt:single
Next »
3.8.9. opt:selector
This chapter describes one of section instructions. We recommend to read Sections first to get to know more about them.
This attribute applied to any tag changes it into a selector with the specified name. It allows to reduce the following code:
<ol> <li opt:selector="list"> <opt:foo>Layout 1: {$list.variable}</opt:foo> <opt:bar>Layout 2: {$list.variable}</opt:bar> <opt:joe>Layout 3: {$list.variable}</opt:joe> </li> </ol>
Instead:
<ol> <opt:selector name="list"> <opt:foo><li>Layout 1: {$list.variable}</li></opt:foo> <opt:bar><li>Layout 2: {$list.variable}</li></opt:bar> <opt:joe><li>Layout 3: {$list.variable}</li></opt:joe> </opt:selector> </ol>
The attribute has similar features, as opt:section.
See also:
- 3.8.9. opt:selector
3.8. OPT attributes - « Previous
3.8.8. opt:section - Next »
3.8.10. opt:single