Quantcast
Channel: Toolset » All Posts
Viewing all articles
Browse latest Browse all 20145

Conditional field display of parent post field on child content tempate

$
0
0
<div style="float:right; width:20%;">[types field="profile-pic" width="175" height="245" proportional="true" align="right" id=""][/types]</div>
<div style="float:left; width:70%;"><h2>[types field="specialty" id=""][/types]</h2><br>
[wpv-if bios="wpcf-bio" evaluate="!empty($bios)"][types field="bio" id=""][/types][/wpv-if]
[wpv-if undergrad="wpcf-education-undergraduate" evaluate="!empty($undergrad)"]<h3>Undergraduate Education:</h3><br>[types field="education-undergraduate" id=""][/types][/wpv-if]
[wpv-if graduate="wpcf-education-graduate-school" evaluate="!empty($graduate)"]<h3>Medical Education:</h3><br>[types field="education-graduate-school" id=""][/types][/wpv-if]
[wpv-if certs="wpcf-certificates" evaluate="!empty($certs)"]<h3>Certifications:</h3><br>[types field="certificates" id=""][/types][/wpv-if]
[wpv-if assoc="wpcf-associations" evaluate="!empty($assoc)"]<h3>Associations:</h3><br>[types field="associations" id=""][/types][/wpv-if]
[wpv-if affil="wpcf-hospital-affiliations" evaluate="!empty($affil)"]<h3>Hospital Affiliations:</h3><br>[types field="hospital-affiliations" id=""][/types][/wpv-if]
[wpv-if intern="wpcf-internship" evaluate="!empty($intern)"]<h3>Internships:</h3><br>[types field="internship" id=""][/types][/wpv-if]
[wpv-if res="wpcf-residency" evaluate="!empty($res)"]<h3>Residency:</h3><br>[types field="residency" id=""][/types][/wpv-if]
[wpv-if fell="wpcf-fellowship" evaluate="!empty($fell)"]<h3>Fellowship:</h3><br>[types field="fellowship" id=""][/types][/wpv-if]

[wpv-if phones="wpcf-phone" evaluate="!empty($phones)"]
<h3>Direct Contact Information</h3><br>
<h5>Direct Phone:</h5>[types field="phone" id="$facilities"][/types][/wpv-if]
  
[wpv-if fax="wpcf-fax" evaluate="!empty($fax)"]<h5>Direct Fax:</h5>[types field="fax" id="$facilities"][/types][/wpv-if]
[wpv-post-body view_template="None"]
</div>


I am having issues getting the last two fields Phone and Fax to display.

Providers belong to a facility and the facility has the contact information in it because there can be multiple providers to a facility.

I have setup the phone and fax fields the same way I did the others for a conditional display. If I remove the wpv-if the fields display properly but I need to make them conditional so that the labels i have built around them are not displayed if they are left blank.

How Do I correct this?

Thank you in advanced!


Viewing all articles
Browse latest Browse all 20145

Trending Articles