Skip to content

Kirby 4.1.2

$snippet->parent()

Returns the parent snippet if it exists

$snippet->parent(): Kirby\Template\Snippet|null

Return type

Kirby\Template\Snippet|null

This method does not modify the existing $snippet object but returns a new object with the changes applied. Learn more →

Parent class

Kirby\Template\Snippet