Edit on GitHub
Jump to docs navigation

Twig Components / Methods / canonical

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.