Hi guys,
Wondering if someone could give a non-php expert a hand here. I have a Taxonomy View that is now working nicely except for one filter. The View creates a block of Taxonomy Categories for my blog. Please note, this is a list of terms, not posts. See http://trip2.premiereventconcepts.com/blog for a visual aid. The categories are set ahead of time by an administrator, so these are not Tags. This means that not all Categories actually have posts yet.
My view works as is, unfortunately, ALL Categories show up in the sidebar, whether there are posts or not in the Category. I'd like to use Views PHP Filter to filter out the Categories that do not currently have any posts in them.
I don't really know where to start. I've never done anything at all with Taxonomy, am not familiar with their structure, etc... I'm assuming each Taxonomy term is part of a large object (probably a Vocabulary object) and that each term as part of its object/array has some sort of post counter. I'm assuming the PHP Filter could be some sort of if statement setting a condition that this counter must be larger than 0 or NULL. However, I'm not even sure my basic assumption on the structure of the Taxonomy array/object is correct, and I don't know where to start.
Any help?
Comments
Anyone able to help?
Anyone able to help?
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Views PHP Filter isn't for taxonomy terms
Hi Anthony -
I couldn't get your web site to come up; I'm not sure why. I'm assuming you are using Drupal 6.x.
The Views PHP Filter module adds the ability to filter node id's with PHP snippets in Views; it won't work to filter term id's for categories (taxonomies).
You might want to try one of these modules:
http://drupal.org/project/taxonomyblocks
http://drupal.org/project/taxonomy_navigator
Thanks for the info. That is
Thanks for the info. That is disappointing. I'll look into those other modules.
Yeah, the site I'm working on is not mine, it's a clients... unfortunately, I decided to upgrade my site via drush yesterday and it went... badly. I have backups, I just haven't fixed it yet. Need to get this client's site done first.
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/
Taxonomy Blocks looks
Taxonomy Blocks looks promising, but I was using the Taxonomy terms to link to views I created for the blog, not linking to the Taxonomy pages. Is there a way to override where the links go to in either of these modules? Or is there another module that could handle it automatically as new categories are added? I could probably figure out how to do this in template.php with a little help.
tony
Anthony Pero
Project Lead
Virtuosic Media
http://www.virtuosic.me/