In Drupal 8 I try to get the absolute site url in a Views custom text field.

I added {{ url('view.frontpage.page_1') }} which gives me example.com/node

Drupal docs say {{ url('view.frontpage') }} would do it, but it just gives me wsod and throws an error like so:

AH01071: Got error 'PHP message: Uncaught PHP Exception Symfony\\Component\\Routing\\Exception\\RouteNotFoundException: "Route "view.frontpage" does not exist." at /../../docroot/core/lib/Drupal/Core/Routing/RouteProvider.php line 187\n'

Any ideas?


The documentation could be out of date. Check your router table for the name of the route. In my Drupal 8 site it is view.frontpage.page_1.

|improve this answer|||||
  • I understand that each module can have a .routing.yml file. But I don't know what you mean by router table. What do you mean by it and where can i find it? – andir Nov 2 '16 at 10:58
  • It's a database table. – Brian Young Nov 4 '16 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.