Inversion::Template::
PublishTag class
Superclass | Inversion::Template::Tag |
Included Modules |
Inversion
publish tag.
The publish tag exports one or more subnodes to enclosing templates.
Syntax
<!-- Outer template --> <html> <head> <?subscribe headers ?> </head> <body><?attr body ?></body> </html> <!-- In the body template, add a stylesheet link to the outer template's <head> --> <?publish headers ?> <link rel="stylesheet" ... /> <?end ?> <div>(page content)</div>
Attributes
- key R
The name of the key the nodes will be published under
Public Class Methods
Create a new PublishTag
with the given ‘body`.
Public Instance Methods
Render the tag as the body of a comment, suitable for template debugging.
Render the published subnodes in the context of the given ‘renderstate`, but save them for publication after the render is done.