I have an urls:
- website.com/portfolio-entries/23
- website.com/portfolio-entries/25
I would like to make an view for them to display node which has id the same as last part of url (from last /
to the end).
I have red the description for View > Url (administration panel > Content > Views > My_view):
This view will be displayed by visiting this path on your site. You may use "%" in your URL to represent values that will be used for contextual filters: For example, "node/%/feed". If needed you can even specify named route parameters like taxonomy/term/%taxonomy_term
So I set it to portfolio-entries/%entry_id
(I hope I understood it right).
But how now make this view display only sinlge entry which has the id set to %entry_id
?
I've tried with View > Filters (add) > ID but I can only set there hard-coded values (e.g. 23 makes this view display only entry #23). How can I place there my %entry_id
?
In other words I was reproducing steps from https://www.ostraining.com/blog/drupal/views-specific-node/ (it's for Drupal 7 but it works the same way in Drupal 8) but instead of har-coding the id value I want to take it from last part of the url.