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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.