Query to display banner in a widget - based on Taxonomy term?

Topics: Administration, General
May 3, 2014 at 2:14 AM
I have a large selection of taxonomies with child terms and want to be able to display a banner on a page - through a projection widget, depending upon what term the banner is tagged.

So for, example, I have a sample taxonomy below:

I have widget that displays a banner based on the taxonomy term it is tagged with.

So I have a 'Bull Frog' page. Currently I have to write a query that filters by:
content-type: banner
taxonomy term is: Bull Frog.

Then a widget that loads this projection... which means
1) I have to do this for each new term
2) It soon gets messy, in both queries area and widgets!

To add to the mix, I would also like a fallback - so that if there is no banner tagged with say 'Killer Whale', the fallback is the parent term - 'Whales'. If there is no banner for 'Whales', the fallback is a 'Sea Creatures' banner.

Is there an elegant way to do this? With queries, tokens, projections? I am sure it can be done but it's something I've not been able to figure out.


Sea Creatures
    Blue Whale
    Minky Whale
    Killer Whale
    Great White Shark
    Tiger Shark
    Hammerhead Shark
    Tree Frog
    Bull Frog
May 21, 2014 at 9:17 AM
Edited May 21, 2014 at 9:22 AM

I am also looking for a solution for similar functionality!
Aug 12, 2014 at 11:50 PM
So anyone have any suggestions how this could be best implemented? Thanks!