0

I have a content type called slides, for now it has an image field, a body, a title and a link field (linked to the page that the slide is advertising... by the way some pages are views).

So for now I made a Views block to make them all appear in a Slideshow and it works. But now I would like to create a new Views block that will only show the slide related to the page you visit. So for example, on the homepage you have the slideshow of all my slides but when you click on one of them, you go visit the specific page advertised (e.g. contact slide linked to contact page).

But when you visit the page, you should see the new block with the specific slide related to the page. I search for answers and I think Contextual filter is the option to use in Views, but I am not accustomed to it and the examples that I found are not exactly using available value for me.

I am thinking I might be able to filter the slides vs the path they have vs the page they are on. But I am not sure if it's possible and have no idea how to do it. So please let me know how or send me a few thoughts on where to look at. Thanks!

0

Also display the block on slides content in full page view, and in your view add the contextual filter "Content: Nid" with the following settings :

Provide a default value : Content ID from URL

It will be automatically filtered, but will still display all slides on your home page

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.