{parent}

Inside an overriding block: the content of the block it overrides.

Layouts and components Single tags

Syntax

{block 'name'} {parent} ... {/block}

Description

{parent} stands inside a {block} of a page that overrides a block of its layout or wrapper. It is replaced by the content of the block being overridden, so the page can add to a region - before it, after it, or around it - instead of replacing it entirely.

It is resolved in the text while the page is assembled, together with the blocks and {extends}, and is gone before the page renders. Through a chain of layouts, each {parent} is the next block down the chain.

A {parent} anywhere else - outside a block, or in a block that overrides nothing - reaches the render, and is an error under the strict check.

Examples

Adding to a region

The page keeps the layout's footer text with parent and adds a line after it.

Templateexamples/parent/1-add.pad
{extends '_layouts/extendsCard'}
{block 'title'}Release notes{/block}
{block 'footer'}{parent} - version 3.0.2{/block}
<p>Faster first render and a new chart kind.</p>
Resultopen alone

Release notes

Faster first render and a new chart kind.

Made with PAD - version 3.0.2

See also

  • {block} A named region of a layout or wrapper - and a page's override of it.
  • {extends} Frames the page with a layout instead of its directories' wrappers.