EE2
I’m looking to be able to have a list of subjects that can have more than one related ‘tutor’
but tutors may or may not have an “open” status.
If a tutor does I’d like to have a link to their page and if not (“moderation” status) then still show their name but not a link to their page
I currently have this:
<div class="sub-tutor">
{related_entries id="sub_tutor_1"}
<h2>{if status="Open"}<a href="http://{path=tutors/about/{url_title}}">{/if}{tut_first_name} {tut_last_name}{if status="Open"}</a>{/if}</h2>
<p>{/related_entries}</div><!-- /.sub-tutor --><br />
<div class="sub-tutor"><br />
{related_entries id="sub_tutor_2"}</p><h2>{if status="Open"}<a href="http://{path=tutors/about/{url_title}}">{/if}{tut_first_name} {tut_last_name}{if status="Open"}</a>{/if}</h2>
<p>{/related_entries}</div><!-- /.sub-tutor -->but adding the if statements stops the page from showing is there another way around this using the related field?
This doesn’t seem to work either:
<div class="sub-tutor">
{related_entries id="sub_tutor_1" status="Open"}
<h2><a href="http://{path=tutors/about/{url_title}}">{tut_first_name} {tut_last_name}</a></h2>
<p>{/related_entries}</div><!-- /.sub-tutor -->but all is fine when I remove the ‘status’
Thanks.