I would like to conditionally render a component in a VisualForce page based on a custom field.

I was hoping to do something like this:

<apex:page standardController="myObject__c">
    <c:myComponent myProperty="{! Id }" render="{! myBoolean__c }" />

Components don't have a render property though.

What is the best way to do this?

1 Answer 1


The property you're looking for is called rendered, not render. And it's available on most (if not all) tags.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .