Does anybody know of a module that will filter stories by region? Say by state?

Comments

bugz_nz’s picture

You could use the taxonomy module to create a vocab called states with all the states listed as terms, then make sure you assign the content to one or more of these terms when you create it.

cog.rusty’s picture

Taxonomy does this out of the box. If you have a vocabulary with the states, and term #40 is Alaska, you get the Alaska stories at "http://yoursite/taxonomy/term/40", which you can alias as "http://yoursite/states/Alaska". (If this is what you meant.)

bobdog’s picture

Thanks for the replies. OK, when I look at taxonomy modules, there are several. Taxonomy ez filter seems to describe what I want. Is that all I need or do I need to have other(s) to make it work?

bugz_nz’s picture

The taxonomy module comes with the Drupal download/install by default.

Enable it under: Admin/Modules

Add vocab and terms under: Admin/Taxonomy (categories on the admin menu)

Click, add vocab, call it "States"

Then click add terms and add all the states.

bobdog’s picture

Thanks for the reply.

I was able to figure out the install, however, after trying to add "States" to vocab I get the error:

warning: array_flip(): The argument should be an array in /home/iwishine/public_html/parade/modules/taxonomy_ezfilter/taxonomy_ezfilter.module on line 92.
warning: Invalid argument supplied for foreach() in /home/iwishine/public_html/parade/includes/form.inc on line 939.

Anybody have a clue for me?

I did an uninstall and such...reinstalled, and still same error.

bobdog’s picture

Well, a magic wand came by. No more sql error. Go figure.

Now, on the rest of the instructions,

"Then click add terms and add all the states."

I do not see this. All I have after making the "states" is define level 1 and define level 2.

Any help appreciated.

cog.rusty’s picture

The 'taxonomy_ezfilter' module which you downloaded is for more advanced things. It is for using two different vocabularies and filter the first one against the second one.

First, you should get familiar with the taxonomy module which was already included in the Drupal distribution. That one was enough for what you wanted, because you needed only one vocabulary. Later you can try more advanced stuff.

To start using the taxonomy module included in Drupal, you just click "categories", define a vocabulary, and add terms into it.

bobdog’s picture

Sounds easy enough.

How would I make navigation for that? Currently there is no search box in the chamelion theme I have. The client wants a drop down list of areas for stories.

And I've yet to post the next question- how do I make a drop-down category list to navigate to that area. And have people designate where they are from when posting a story?