Support Hierarchical Taxonomies
| Project: | Advertisement |
| Version: | 5.x-1.5-rc2 |
| Component: | ad module |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | by design |
Jump to:
Thanks for the module!!! What was the reasoning behind disallowing hierarchical taxonomies? Allowing such taxonomies would allow for more complicated views. For example, I could create sections and even page level ads. In the view for the section, I'd use the view taxonomies filter depth argument to find everything assigned to either the section or the page level. But on the page, I'd just pull terms for that page.
It would be very interesting to write a new filter that searched for the lower level taxonomy first, then the parent taxonomy, and then sorted so that it first found the page level ad, but if none were found, it would use the section ad. If you permit this hierarchical change, I'll probably write that.
| Attachment | Size |
|---|---|
| hierarchy.patch | 1.4 KB |

#1
You can assign multiple vocabularies to advertisements, so you can set up your own taxonomy with all available options (including hierarchy) and use this to build your views. Patching the default ad groups type is not necessary to accomplish what you are trying to do.
Technically there's no problem with allowing hierarchy, but it does complicate the queries required to determine which advertisements to display. I chose to go with a simpler administrative interface, and faster queries by default.