Last updated October 29, 2018

This tutorial is designed to address relatively advanced use cases when theme developers want to create links to content outside of the template's scope. This seldom occurs in templates. If you're editing the template for a specific entity type, example node.html.twig, there will almost always be a {{ url }} or similar variable that you can use to link to the entity in question. Make sure you check for an existing variable with a URL first.