How can I display/hide related list(s) table on a VF page for a custom object using IF statement? I am currently displaying 3 separate related lists on my VF page using HTML markup, one of those:
<apex:outputPanel rendered="{!If(case.Parent != null, true, false)}">
<div class="my-table">
<h3 class="table-title">Related List: 1</h3>
<div class="row row-header">
<div class="column"><p>Field1</p></div>
<div class="column"><p>Field2</p></div>
<div class="column"><p>Field3</p></div>
<div class="column"><p>Field4</p></div>
<div class="column"><p>Field5</p></div>
</div>
<apex:repeat value="{!relCases}" var="relCase">
<div class="row row-data" >
<div class="column"><p>{!relCase.field1__c}</p></div>
<div class="column"><p>{!relCase.field2__c}</p></div>
<div class="column"><p>{!relCase.field3__c}</p></div>
<div class="column"><p>{!relCase.field4__c}</p></div>
<div class="column"><p>{!relCase.field5__c}</p></div>
</div>
</apex:repeat>
</div>
</apex:outputPanel>
I would like to add a IF statement in the VF page, so that, whenever the Lookup field is empty, this complete should be hidden. Any suggestions?
<apex:outputPanel rendered ="{!condition}"> <!--Content to show --> </apex:outputPanel>
something similar.