Edit on GitHub
Jump to docs navigation

Twig Components / Methods / canonical

Note: You are currently reading the documentation for Bolt 5.0. Looking for the documentation for Bolt 5.2 instead?

canonical(route = null, params = []) is a Twig function to create a valid URI to the current page, to use in as an external link. If a path is given, returns the canonical URL for that given path.

For more information, see Linking in templates .



Edit this page on GitHub
Couldn't find what you were looking for? We are happy to help you in the forum, on Slack or on Github.