Display content based on URL I am working on Drupal 8. I have a to display content from a content type on different pages. I am trying to use Views to achieve this. 

In the content type I added a field to refer to Pages so that I can create relation between content of content type and Pages (another content type). Basically its like tagging content with page name.

I want to display content from content type created on those pages tagged in the content. I am not able to achieve using views.

Any ideas how this can be done? I have tried contextual filter and relationship but none works. 

Thanks
You can use as an example the taxonomy term view, which is in the D8 standard installation:

admin/structure/views/view/taxonomy_term


Two steps are necessary. First define the parameter in the path. For the taxonomy term this is:

Path

taxonomy/term/%
 ‎
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


Then add a contextual filter in the advanced section, which will process this parameter:

CONTEXTUAL FILTERS
Add contextual filters
Content: Has taxonomy term ID


For the details see the example in your drupal installation. In your case you would use the referenced Pages node id.

If you want to use the view as a block, you cannot define the parameter in the path setting of the page. Then you have to switch in the contextual filter to "Provide default parameter" and configure the parameter from URL.