Wordpress hierarchical dropdown - wordpress

We would like a hierarchical dropdown on a form to show the term names of a taxonomy called areas. The users first selects a category and gets taken to the form page - we get the dropdown to show the term names but it is from all the posts - we just want the term names from areas that is within the selected category.

I'm not sure if this would help, but I generally try to condense my forms as much as possible. I like this jQuery plugin, and I've used it several times:
Chosen
Description from the site:
Chosen is a JavaScript plugin that makes long, unwieldy select boxes much more user-friendly. It is currently available in both jQuery and Prototype flavors.
You can use it with the tag to create your Parent Category / Term names list, and allow people to quickly get to the term name they want.
Hope this helps!

Related

Hide or filter a category by affiliate aspdotnetstorefront

Can a particular category be hidden from an individual affiliate. Say for instance the affiliate would like not to have "pet food" show up when his link is used??
Absolutely, but it's going to require customization that's specific to your navigation xml package and requirements.
The easiest way would be to hide the category from the menus in the xml package you use for navigation based on the current users affiliate.
However, 'hidden' could mean quite a bit more than that. If you need to hide the products in that category all together (for example from a users search), you'll need to do quite a bit more customization including the GetProducts stored procedure.
I hid my my categories by adding an "IsHidden" column to the Category table. Then added "AND IsHidden = 0" to the following stored procedures:
aspdnsf_EntityMgr
aspdnsf_SearchCategories

Drupal Views based on filtering taxonomies based on available content

This seems like it should be relatively basic, but I can't seem to wrap my brain around it. I have a client in need of some advanced filtering for thousands of different content items. Each content item will be filed using different taxonomy types. As you filter through the system, it should eliminate content that does not correspond to the selected taxonomy.
So far, so good.
The issue is that the filters should update based on taxonomy of the selected content.
In this particular case, there's a select box for Location, Hunting/Fishing, and Species. If they select Illinois > Fishing > Freshwater, the last filter (Species) should only show tags from the Species list that correspond to previously selected filters.
The system works fabulously already but displays every species of fish, not just the ones from the selected filter.
Any guidance would be tremendously appreciated.
I would recommend Views_Hacks module for this (Views Selective Exposed Filters submodule) as also as an AJAX enabled and Autosubmit views.
Drupal facet search https://drupal.org/project/facetapi will give you the required functionality.
A quick search on google for 'faceted search drupal' will give you lots of tutorials on how to set it up, one of which being: http://envisioninteractive.com/drupal/drupal-7-views-with-faceted-filters-without-apachesolr/

Drupal - linking Taxonomies together with views in a sequence

I have something in Drupal (v6) that i'm trying to nail, but having a little difficulty. I am laying out a list of products which have the following taxonomy vocabularies attached to them:
Manufacturer
Product Type
Use
When entering a product, which uses a custom content type, the admin can select one or more terms from each of these vocabs.
I then need to lay the front-end out using Views as follows:
List of Manufacturers displayed to the user - user clicks one
List of Product Types displayed to the user that have a product contained within that matches the chosen Manufacturer - user clicks one
List of Uses displayed to the user that have a product contained within that matches the chosen Manufacturer and Product Type - user clicks one to view full node details
The tricky bit is making the link between each of these vocabs using Views. The taxonomy vocabs have no hierarchy defined within them, I just need to be able to display them to the user in the order above. I can't change to using a nested hierarchy in just one vocabulary as the 3 seperate vocabs are used elsewhere on the site for other purposes and need to stay as they are.
Is it possible to create what i'm after with Views? Any tips on how best to rig it together?
Could use 3 views, with the 2nd and 3rd taking arguments.
So a url could look like:
/products/ - 1st view
/products/Ford - 2nd view, one argument
/products/Ford/Cars - 3rd view, two args
That said, for something like this I'd probably just write a custom module. How practical that is depends on how comfortable you are with Drupal and PHP.

How to exclude posts in taxonomy based on custom field?

I have a custom post type called 'real-estate' and a bunch posts (listings) within it. What I'm trying to do is create a handful of home styles and within them, specific listings of available homes.
So right now, I have the search query pulling in only the home styles from the search by only showing results with the custom field "model" set as "true." However, when clicking this, I would like it to display specific homes which are apart of that style.
For example, a search query will yield Home Style A and Home Style B. When the user clicks Home Style A, it would show a general overview of the home style, with a link to an archive page of specific homes (i.e. 123 Fake St., 456 Made-up Lane) but omit the Home Style A from displaying within that query.
Right now I'm accomplishing this by creating a new taxonomy called "Home Styles" and categorizing them as such. I'm displaying only the model homes by querying only posts with that custom field I mentioned above. That part is working fine. However, when I click the link to display the rest of the homes in that taxonomy (/model-homes/model-home-a/) it shows all posts within that taxonomy, including the model home listing. Is there a way I can exclude the model homes from the taxonomy archive similar to the way I'm only including them in the search? I'm hoping theres a solution to make it dynamic by editing the taxonomy-home-style.php instead of doing it for each term in case new ones are added frequently.
Hopefully this makes sense, I've been trying to wrap my brain around the concept for hours now and trying to think of the best solution to accomplish this. Thanks.
Nevermind, figured this out on my own. I made it more complicated than it was.
I used the method on this site to edit my taxonomy-model-home.php. Adding two lines of code and it works!
http://www.solo-technology.com/blog/2007/09/08/how-to-another-way-to-exclude-posts-from-the-front-page/

Content Taxonomy along with Conditional Fields

I'm still young at Drupal.So please correct me wherever needed.
I have a requirement wherein I want my content type to have my own fields (achieved with CCK), then I want one of the fields to be a selectable drop down and each drop down value should actually categorize them so that each type can come on separate page. This I managed with taxonomy. And in addition to these,I wanted some other fields in the same content type to be dependent on a particular value in the drop down. So I used conditional fields. And in order to use taxonomy term as field,I used content taxonomy. But unfortunately, conditional fields doesn't see the content taxonomy drop down (it works perfectly well if its a normal non-taxonomy drop down).
So basically,
I want content to be separated (i.e.
on different pages) on the basis of
a value selected from drop down.
And if a particular value is
selected from drop down, few other
fields should become visible.
How am I to incorporate these things? Am I on the right track or completely off track?
I am using Drupal 6.14. :)
Thanks for all the help!
I think you are on the right track, but the Conditional Fields is still in beta, so bugs/missing features are to be expected. Also, Content Taxonomy is a bit special compared to other CCK modules, as it only provides a replacement of the taxonomy fields on node edit forms, but is not present/active during node rendering.
That said, your Problem is already filed as a feature request in the issue queue of the conditional fields module, and there are some patches available and discussed to solve it - so you might want to check out that thread.
I'm not completely sure how you require the 'different pages' part to work, but if everything else works with a non-taxonomy dropdown - and you don't have time for the issues with Conditional Fields to get shaken out - then you may be able to set up a View page that filters on the value of the CCK node.

Resources