I am building a site for a client where they vet and vote on endorsing candidates for public office. I created a blog page viewable only by staffers to enter information on new candidates that have qualified for consideration.
I then created a "New Candidates" page and added the liquid and partial templates so a portion of the information will show up on the page under their respective state by adding a "georgia" tag or "north_carolina" tag.
<h3>GEORGIA</h3>
{% tag "georgia" with "ga_posts" %}
<br>
<h3>NORTH CAROLINA</h3>
{% tag "north_carolina" with "nc_posts" %}
<br>
<h3>NEW JERSEY</h3>
{% tag "new_jersey" with "nj_posts" %}
<br>
<h3>SOUTH CAROLINA</h3>
{% tag "south_carolina" with "sc_posts" %}
<br>
<h3>TEXAS</h3>
{% tag "texas" with "tx_posts" %}
<br>
<h3>VIRGINIA</h3>
{% tag "virginia" with "va_posts" %}
I will use liquid and partial templates on each state page (once I've built those) so that the candidates show up on the appropriate state page.
My question is this. At some point, we will have an "Endorsed Candidates" page. Instead of staffers having to go back and add the information about a candidate manually to the Endorsed Candidates page under the respective state is it possible to write conditional liquid so they can go back to the original post of the candidate's information and add an 'endorsed' tag so the information shows up on the Endorsed page under their respective state ie,
<h3>NORTH CAROLINA</h3>
{% tag "north_carolina" AND "endorsed" with "nc_posts" %}
Hello Brad!
As it happens, NationBuilder supports an "and" operator as part of our Liquid syntax. To learn more (and to see some sample code), check out our 'How to use Liquid' page.
-- Ian
Showing 6 reactions
Sign in with
Hines Digital
Certified Architect
Certified Expert
Hines Digital
Certified Architect
Certified Expert
Act for America
Greg Evers for Congress
Marston Digital Solutions
Certified Architect
Certified Expert
I have tried various iterations based on the How to use liquid post and specifically the “and” logic operator. Unfortunately I have not been able to get it to work.
So I guess my question is really this. What is the code I need to use to make this work for a NationBuilder client?
Thanks,
Brad
Hines Digital
Certified Architect
Certified Expert
Act for America
Greg Evers for Congress
Marston Digital Solutions
Certified Architect
Certified Expert
Act for America
Greg Evers for Congress
Marston Digital Solutions
Certified Architect
Certified Expert