Skip to content

Instantly share code, notes, and snippets.

@dreadfullyposh
Created May 15, 2014 19:24
Show Gist options
  • Save dreadfullyposh/87d745662d6868951e97 to your computer and use it in GitHub Desktop.
Save dreadfullyposh/87d745662d6868951e97 to your computer and use it in GitHub Desktop.
PaternitEE Conditional using Mo' Variables and IfElse
// First off, you'll want to make sure you have Mo' Variables enabled, and make sure a default value is being set for
// your field names, so things don't go crazy.
// IfElse will prevent both conditions from parsing, since this is an advanced conditional and would kill performance
{exp:ifelse parse="inward"}
{if "{get:your_query_string_param}" == ""}
{exp:channel:entries (other stuff here) }
// perhaps a snippet of your loop template to keep things try
{/exp:channel:entries}
{if:else}
{exp:paternitee:entries (other stuff here)}
// presumably the same snippet here
{/exp:paternitee:entries}
{/if}
{/exp:ifelse}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment