2

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?

1 Answer 1

1

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.

2
  • 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
    Commented Nov 2, 2016 at 10:58
  • It's a database table. Commented Nov 4, 2016 at 7:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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