{slot} gives a custom tag - a template in _tags/ or
_common, or an _include snippet used as a pair - more than one
place for the caller's content. Like {block} it plays
two roles depending on where it stands.
{slot 'name'} pair standing directly in the content of a custom
tag where it is used is a fill. It is taken out of the content when the tag opens
and kept for that one use of the tag; the rest of the content goes to the template's
@content@. {slot 'name'/} there is an empty fill.{slot} - in the tag's template - is a place: the fill
renders there, or, when the caller gave none, the slot's own content as a default.A default that holds @content@ is a frame around the fill:
{slot 'footer'}<footer>@content@</footer>{/slot} renders the footer
element only when there is a fill to put in it; otherwise its @else@ part, or
nothing. A fill is the caller's text: it renders with the caller's variables, and a
{#name} or {slot} inside it belongs to the caller's own tag, which
is how a template passes a slot of its own on to a tag it uses. From a tag's PHP,
padSlotFill ( 'footer' ) reads a fill.
Under the strict check a slot without a name, and a slot outside any custom tag, are
errors. The examples use the application's tag _tags/slotCard.pad, a card with a
title slot (default Untitled
) and a framed footer slot.