Import instagram posts as nodes automatically with the instagram importer module for drupal 8 & 9.


Jan 10, 2020 in Drupal 8, Snippets

What if you have to link to a specific url in in twig, but you only have the nid? Moreover, it is good practice to use the id and not a hardcored url. Here's what you should use:

 {{ path('entity.node.canonical', {'node': 522}) }}