Documentation Index
Fetch the complete documentation index at: https://docs.ghost.org/llms.txt
Use this file to discover all available pages before exploring further.
{{> "partials"}} is a helper for reusing chunks of template code in handlebars files. This can be useful for any repeating elements, such as a post card design, or for splitting out components like a header for easier to manage template files.
All partials are stored in the partials/ directory of the theme. Partials will inherit context and make that context available within the partial file.
Example
Partial properties
Partials can take properties as well which provide the option to set contextual values per use case.Properties example
Dynamic partials
You can pick a partial name dynamically with a sub-expression rather than a string literal. This is useful when iterating over a collection where each item needs a different partial, for example rendering per-platform social icons. Use the block form for dynamic partials, not the inline form. The block form falls back to its inner content when the named partial doesn’t exist; the inline form throws a page error and breaks the rendered page.{{/undefined}}. This looks unusual, but it’s the only form Handlebars accepts when closing a dynamic partial block.
