Inversion subscription tag.
The subscribe tag places one or more published nodes from subtemplates.
<!-- Outer template --> <html> <head> <title><?subscribe title || Untitled ?></title> <?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>
- content R
The content publish to the tag so far during the current render
- default R
The tag’s default value if nothing matching its key is published
- key R
The name of the key the nodes will be published under
Create a new
SubscribeTag with the given ‘body`.
Tell the ‘renderstate` that this tag is interested in nodes that are published with its key.
Return a representation of the object in a String suitable for debugging.
Pub/sub callback. Called from the RenderState when a PublishTag publishes ‘nodes` with the same key as the current tag.
Return the subscribe node itself to act as a placeholder for subscribed nodes.
Stringify and join all of the published nodes for this subscription and return them as a String.