Inversion::Template::
FragmentTag class
Superclass | Inversion::Template::Tag |
Included Modules |
Inversion
‘fragment’ tag.
This tag provides a way to generate a fragment of content once in a template as an attribute, and then reuse it later either in the same template or even outside of it.
Syntax
<?fragment subject ?>Receipt for Order #<?call order.number ?><?end subject ?>
Attributes
- key R
The fragment key; corresponds to the name of the attribute that will be set by the rendered contents of the fragment.
Public Class Methods
Create a new FragmentTag
with the given ‘body`.
Public Instance Methods
Render the fragment and store it as an attribute.