I created a module for GitHub's API and am having trouble preventing the module's function {exp:cl_github:repo_contents_archive}
from running given a conditional. The reason this is imperative is that the function actually sends a file to the browser (sets headers, echos, and dies).
{if logged_out}{redirect="member/login"}{/if}
{exp:channel:entries require_entry="yes" parse="inward"}
{addon_github}
{exp:cl_github:repo_contents_archive
owner="{owner}"
repo="{repo}"
ref="{ref}"}
{/addon_github}
{/exp:channel:entries}
I've tried a few things like putting {if logged_out}limit="0"{/if}
in the {exp:channel:entries}
tag.
Another solution I thought of was to pass into my {exp:cl_github:repo_contents_archive}
a parameter like is_authenticated="{logged_in}"
but for some reason that wouldn't parse the value of {logged_in}.
I don't really want to hardcode checking for logged_in in the module itself. Can you guys/gals think of any other workaround or something I am missing?