-
- 34 Posts
Hello,
I have the following situation.
I have an event page to which sponsors can optionally be added to in various levels, such as Platinum or Gold, etc.
So I have a sponsors array set up where a user can add a sponsor logo, a link to the sponsor's web site, and designate the sponsorship level, i.e. Platinum or Gold.
Using the &where statement I can show just Platinum or just Gold easily enough.
But I need to show the suitable array of logos beneath a title, such as:
Platinum Sponsors
- logo
- logo
- logo
Gold Sponsors
- logo
- logo
- logo
What I did was make a chunk for each with the appropriate &where filter. But I would like to show the entire chunk with the MIGX arrays in them only if there is at least 1 of the sponsor level. So in other words, if the user just puts up all Gold sponsors, I don't need to show the Platinum chunk, and vice versa, or show both if both exist.
I've been using the If add-on extensively. Is there a way to query the value of a template variable that is not tied to the current template but buried in the MIGX variable that is tied to the current template?
The other solution is to just add a TV outside of it, attach it to the template and check if Platinum = yes, if Gold = Yes, etc. But from a user interface standpoint it would be best if the designation they choose within MIGX would automatically trigger showing the appropriate chunk with the filtered MIGX array within.
-
- 5,888 Posts
you can try the &toPlaceholder-property and show the chunk only, if the placeholder is not empty
http://forums.modx.com/thread/74718/if-statement-to-hide-migx-call-if-empty#dis-post-414340