I am trying to run an and/or conditional check across 2 channels and am having trouble figuring out how to phrase the code.
What I have thus far is a simple:
{if logged_in}
{exp:channel:entries channel="applications" author_id="CURRENT_USER" limit="1" dynamic="no" orderby="edit_date" sort="desc"}
{if no_results}You must complete an <a href="http://{site_url}application/" title="Fill out an Application">Application</a> to be eligible for job-matching.{/if}
{/exp:channel:entries}
{exp:channel:entries channel="resumes" author_id="CURRENT_USER" limit="1" dynamic="no" orderby="edit_date" sort="desc"}
{if no_results}You must complete a <a href="http://{site_url}resume/" title="Fill out a Resume">Resume</a> to be eligible for job-matching.{/if}
{/exp:channel:entries}
{/if}What I want to do is have code that effectively says ‘if CURRENT_USER has no posts in channel x, and if CURRENT_USER has no posts in channel y, then display STRING’ I know I can run conditionals on multiple channels using the |; i.e. channel=“applications|resumes”, but I’m not sure how I would do an ‘or’ conditional; i.e. ‘if CURRENT_USER has no posts in channel x, OR if CURRENT_USER has no posts in channel y, then display STRING’
Using {exp:channel:entries} seems a little verbose to assemble sentences the way one does with normal {if} statements.
Is there a simple way to create these kinds of statements? I’m starting to think that SQL tags and enabling PHP in the templates are the only way at this point, but that will likely end up being fairly verbose as well, and I’m still a little puzzled on where to start.
Any ideas?
Thanks in advance,
Sam