Views and Category are two beautyfull modules that can work togheter to give a killer tool for sorting content in Drupal sites.

The Category module makes possible to insert a view created with the View module in each category (term) or container (vocabulary). In my locations based site i configured more or less 10 containers, each with 3 or 4 categories each. Plus, i'm using country and regions categories (3000+) to localize nodes specific to geographical areas only.
Creating a special view for each category would get me busy for the next year or so, and would then be impossible to manage.

To solve this hassle, could it be possible to have a "clever" taxonomy filter, that:
1. understands in which term/vocabulary the view it belongs to is inserted
2. makes possible to specify as 'Taxonomy term' filter, not a single fixed term but as 'matching term' that corresponds in each different situation to the term/vocabulary (category/container) the view is displayed.

Filter: Taxonomy term >> matching term

This way i could create only one single view, that would display the right content in the right places. Is this just sciencefiction, or something imaginable to get done?

Sorry for my non-dev, non-mother language english and thank you for any support!

Regards
marco

Comments

merlinofchaos’s picture

Because you can use the views_build_view() function, or in the current version of View there is also a place to put a PHP snippet whose primary inspiration was to be able to set arguments in a context-sensitive manner, if you can come up with the PHP code to figure out what a matching term *is*, you can set the argument there and get the functionality you need with no changes to Views whatsoever.

merlinofchaos’s picture

Status: Active » Fixed

I believe the PHP snippet fits the needs of this feature request, so I am closing it; please reopen it if I am wrong.

Anonymous’s picture

Status: Fixed » Closed (fixed)