Contextual filters

Events happening in the community are now at Drupal community events on www.drupal.org.
MR Nich's picture

I am trying to implement slide shows on each page, the slideshow is in a block. I added a category field, I am not sure how to filter the images so that for eg.) I click on the menu link named "health" i see sildeshow images for health category or i click "nutrition" i see nutrition slideshow images. if someone could point me to a video or jus giv the steps how to do this. I would be greatful.

Comments

There are a number of ways to

frazras's picture

There are a number of ways to achieve this, contextual filters is definitely the right direction.
The fastest way I can think about now is to use taxonomy terms to categorize you images then for each link, place the term id at the end of the URL. Use that term id to then create a contextual filter that will display only the images under a particular category

Contextual filters

MR Nich's picture

ok, I used taxonomy, created the categories, I am not sure how to do this "place the term id at the end of the URL. Use that term id to then create a contextual filter that will display only the images under a particular category"

Check out this video, it

varunity's picture

Check out this video, it should help you with some of this "advanced views" stuff: http://m.youtube.com/#/watch?v=lJFMTDuaxy8&desktop_uri=%2Fwatch%3Fv%3DlJ...

Let me know if this helps.

OK I guess I dont know enough

frazras's picture

OK I guess I dont know enough details to give a better solution, the last time I did this (http://www.integrativenutrition.com/connect/recipes) I used a view and built customized urls using the rewrite field output feature. If you want if for primary/main links you will have to manually enter the term id in the menu path to specify the term you want to appear on that page.

check the url format of the links in the above site to see what I mean

Contextual filters

MR Nich's picture

i am going through the videos, haven't seen one that gives what i need so far"Varunity" , next thing: "frazras" I see what you did for your main links, now lets say, I wanted that same video to show on all the sublinks of a particular main link. eg) programs has sub links, I want the same video that shows when you click the program or any of the links under it.

Again, this all depends on

frazras's picture

Again, this all depends on your specific implementation, but views allows you to choose the argument # you want o use. Say for instance your links are http://www.example.com/pathname/[tid] where [tid] is the term id, you can tell views to always choose the second argument so even if you have http://www.example.com/pathname/[tid]/sub-pathname OR http://www.example.com/pathname/[tid]/sub-pathname/sub-sub-pathname [tid] will always be your second argument.

Did this work out MR Nich ?

varunity's picture

Did this work out MR Nich ? If you can give more details of what steps you are taking we'd probably be able to help more. Eg. are you using views module? Is it a slideshow or video? How many such sections does the site have?

Ideally a screenshot or better yet a URL to the site you're working on will help out also. The thing is there are many ways to solve this but we need more info. The context module could be another good option: http://drupal.org/project/context

solution

MR Nich's picture

thanks for all the help, I did it a by making each type of slide a block, then filter it by category, then place thsse blocks in a region then tell which pages each suppose to come out on by putting the page URL

Jamaica

Group organizers

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: