Hey everyone,
This post is to solicit feedback in solving a problem that I currently have. I am assuming that I will have to build a module to do what I need, but I would like to get other people's input as early in this process as possible so I can make better decisions right away.
Here is my problem:
I am rebuilding a large community site that caters to backpackers (primarily in Europe). We will have a large amount of information (much of which will be user generated) that needs to be categorized to a location. For example, if I am traveling to Paris, France, I will want to get as much info about the things to do there and other peoples experiences as possible. Because of this I want most (if not all) of my content to be localized.
I would essentially like to have an activeselect at the top of a view that will narrow down the results of the view dynamically as more selections are made (similar to an exposed filter, but a much more pimped out version). I would have content types such as Hostel Reviews, Travelogues, Photo Galleries, Videos, (the list goes on), but on each of these content types you would specify the location of the content (Country and City for now). So now in the view when you select 'France' all of the content is narrowed down to content from France. It would then populate the 'Cities' active select and if you select a City, then the view would be filtered even more. You would also have all content types that were for that city in France showing in that view. You could then select the type of content that you want, such as Hostel Reviews and it would narrow down the search just to the Hostel Review for that city.
I think you understand my use case well enough now that you will understand the rest of this post.
Where I am at:
I have been researching my options for this and I have not found an acceptable solution yet. I would like to use the 'Location' module if possible so I can integrate with some of the other cool features that it opens up, but since most of my data will be for Europe, this module really doesn't help me that much. I have only really played with it a bit and haven't looked at the code yet, but the first thing that hits me is that it does not have the Country -> City drop down boxes for my users to select the location. I don't want to have my users to enter the city in a text box because then I have to worry about all the duplicates. I may be able to add this, but I have not gotten to that point yet. (Any help or clarification on this would be appreciated...)
My current set up is as follows:
I have a hierarchy of terms using the Taxonomy module that has Country and City in it. I have gotten this working with ActiveSelect in a CCK field for a small subset of data which allows me to have a dynamic drop down in my content type for specifying the location. This solution works for me right now. I need to collect a full list of Country and City information to put into XML format and then import into Taxonomy, which I have not done yet, but I know this is possible. (Any help with this would be appreciated...)
So now I have content types that can be narrowed down by the location specified on creation. I have a View set up that has an exposed filter for 'Taxonomy: Terms for Region' where the user can select the city and submit to get the results. There are a few problems with this current setup. All of the terms (Country and City) are in the same drop down. This means that if you select a country and hit submit it will give you no results (because the content is actually in the sub category). This can be changed with the depth of the filter, but that is kind of besides the point. The main point is that I don't want all of the Countries and Cities to be in the same list. I can create 2 exposed filters for just the Countries and then for just the Cities (depth), but if you select a Country, it will not narrow down the list of Cities (this is very important due to the amount of data present).
What I would like:
I would like to have an exposed filter that is an activeselect that dynamically adds additional exposed filters that are also activeselect fields. All the while filtering the information that the view displays. It doesn't even have to be an activeselect field (that would be nice), but I need a way to have exposed filters dynamically update/add other exposed filters (so to narrow down the cities if a specific country is selected).
Now that your head is spinning:
The way I currently see this problem, I will have to create a new module that pretty much integrates activeselect as an option for the exposed filters in the views module. Can anyone give me any hints as to how to do this RIGHT?
I am pretty much looking for feedback to get me started on this the best way possible. I am pretty new to Drupal development, but I have been a web developer for many years now. I recently started working my way through the 'Pro Drupal Development' book, but I haven't gotten far enough yet to consider myself a master of Drupal in any way shape or form.
If you see problems with my approach or think that there may be an easier way to solve my problem PLEASE speak up. I have noticed a bit of a push for using CCK and Views instead of stand alone modules, so I think the ability to use activeselect in views is probably something people may want.
Cheers...
Comments
Active Select integrated with Views
I thought that there would be a lot of people who would be interested in this. Am I wrong???
The ability to have dynamic exposed filters in views using active select seems like the answer to a lot of categorization issues.
Active Select integrated with Views
Active Select integrated with Views and FormAPI
----
Darly
Feel free to contact me :)
Here we go, buddy:
Create a story clone note, basically a new content type called local story, then local image, local polls, etc.
Add 2 cck fields like country and city. Later on you can then use the VIEW Module to use the exposed filter to select the country and the city :)
The language is selected by IP address and you are set :)
Drupal Me BAD!!!!
PS: to have it fancy, you create a main view for France and then add TABS for each city you need to split it up with.. All much easier than creating a module.. (j/k!)
~~
Linux, Drupal5 and Simple Machines Forum R great (got a "non-Russian Bridge yet (for me..))
http://veberu.hostfabrica.ru/index.php
Interested in this too
I'm interested in this kind of funtionality as well. In my situation, I will have a number of content types (like regular article, file download, webpage review, etc.) that I would like to classify in a number of categories, such as 'subject', 'education type', 'role type', 'material type', etc (doesn't actually really matter).
Now I would like a narrowing kind of search functionality. This means that the user has an overview page with all the subjects (first category). He or she then selects a subject and all nodes that belong to the selected subject are displayed. On the right side, the remaining categories and their terms are shown: 'education type', 'role type' and 'material type'. When the users hits an education type (for example 'primary education'), the list of results is narrowed down to all nodes belonging to both the selected subject and to 'primary education'. Again, the remaining list of categories and terms ('role type' and 'material type') is shown. Now the user can further narrow down the search... and so on, and so on.
Swill, it seems to me that we're looking for the same kind of thing, right?
I've just installed the Views module and have been playing around with it for a bit, but I'm having a hard time figuring out how to exactely create this kind of behaviour. I would be great of someone could give me some hints on how to achieve this.
An example of a site that has the functionality I would like: http://www.contentcorner.nl/?id=1&query=boek
Yep, pretty much the same...
We are looking for pretty much the same functionality.
You may be able to get away with using the Taxonomy Menu module though since you probably will not have as many options as I will. It pretty much just builds a menu system for what you are looking for. One of the other good things about that module is that if you want user content to be accessible without you having to place it in the menu system, it will automatically (if you want) be added to the correct menu section. This is good if you have contributers who you trust...
I will keep you posted if I find/develop a solution to this.
Sponsoring the development of this functionality
Hello Swill (and others),
Thanks again for your reply. I've tried the taxonomy menu module before, and unfortunately it's not exactly what I'm looking for. I'm really interested in the functionality as found on http://www.contentcorner.nl/ where the user can search for a specific term ('book', for example) and then narrow down the search by selecting specific categories (right side of that website once the initial search has been performed).
I'm in desperate need of this kind of search. Therefore, I would like to sponsor a project that will create a module (or build functionality otherwise) to achieve this. The sponsorship could either be financially, or by providing programming-hours of a programmer that hasn't programmed anything for Drupal before but has quite some PHP experience.
People interested in this, please leave a post in this topic.
Refine by Taxonomy
I think that functionality you are looking for, eyos, is in the Refine by Taxonomy development (http://drupal.org/project/refine_by_taxo)
I'm also interested in the originally proposed development - seems like a no-brainer for content tagged by a large taxonomy.
See also...
Modules Faceted Search and Semantic Search. :-)
// David Lesieur // Whisky Echo Bravo // Web applications development // Montreal, Canada //
Not really what I am looking for...
With about 100 countries and about 200 cities per country this solution does not work since there is currently no way to narrow down results with exposed filters (that I have found) based on previously selected filters. If a country is selected then I want the next exposed filter to ONLY have the cities for that country. If all cities are in there then it is just a mess...
swill
It will be a good addition
It will be a good addition to drupal if we can do such a thing, i was trying to make the same thing without success, take a look at
http://drupal.org/project/content_taxonomy
and for adding a lot of taxonomy term in easy way, without using xml
http://drupal.org/project/taxonomy_batch_operations
the ubrowser gives a good example but its only to browse and search, its look like the yahoo answer & question submit form
http://drupal.org/project/ubrowser
and check out this module dependantDropdown
http://drupal.org/project/dependantDropdown
If you find any solution please share with us :)
Thanks
thanks
ya I use content_taxonomy already for a couple things. I will look into the taxonomy_batch_operation if I get this all working instead of having to import it all via xml.
I have looked at ubrowser, but it does not do what i want and I really didn't like that module. I am planning on using ActiveSelect instead of dependantDropdown because no one is maintaining it anymore (or wont be soon).
if/when I put together a solution I will let you guys know...
A few links for reference/tracking purposes...
- Exposed filter selector and term hierarchy- http://drupal.org/node/54365
- Any JS/Ajax/jQuery-Interface dev. ongoing for proximity-filter?- http://drupal.org/node/93649
- Start at a better country/province interface- http://drupal.org/node/31609 (see comment #2)
- Location as CCK field- http://drupal.org/node/125266
- CCK Address plus ajax w/ activeselect module- http://drupal.org/node/134109
- Load exposed filters through AJAX (tangential, but interesting)- http://drupal.org/node/115949
thanks for the research
those links are all going to help a lot. i got your email and i will reply. hopefully i will get something working soon, but i have not had time to work on this recently.
new module
I notice a new module on drupal project
http://drupal.org/project/FixedDataDropdown
http://drupal.org/node/144790
swill did you ever find a solution for this? I require the exact same functionality as you did? I'm new to drupal and any advice would help tremendously.
Thanks,
Maromba
same situation
hello swill
i'm in the same situation ... if you find a solution, it would be very nice to share - i don't have a lot of money - but if you want to give a freelance job to somebody i would spend a small amount of dollars :)
greetings momper
I'm looking for something very similar too...
Basically the same as what you've outlined, but with a couple of additions:
1. If the visitor is logged in that the default city comes from their profile, otherwise by geolocation of their IP.
2. Nearby cities / countries to show up higher in internal search results than ones further away.
3. That nodes can be set to be relevant to more than one country/cities (ie a multi select boxes).
Looking at Drupal it seems with the massive flexibility of CCK, views, the rapidly expanding location module that and taxonomy that we *should* be able to figure something out... but so far my brain is starting to explode. (Yes I'm a Drupal newbie, although a Joomla old hand)
I'd be interested in seeing something like this developed (specially, if need be), too.
Willing to sponsor solution for World Social Forum
Pretty much the functionality described here. Contact
AgaricDesign.com
~ben
People Who Give a Damn :: http://pwgd.org/ :: Building the infrastructure of a network for everyone
Agaric Design Collective :: http://AgaricDesign.com/ :: Open Source Web Development
benjamin, Agaric
Subscribing
Subscribing
subscribing
subscribing
Have you tried
http://drupal.org/project/hierarchical_select
subscribing
subscribing ...
subscribing
subscribing
Subscribing, greetings,
Subscribing, greetings, Martijn
From what i had read,
From what i had read, probabily Hierarchical Select is what you're looking for.
You can check a demo of it here.