Salesforce Stack Exchange is a question and answer site for Salesforce administrators, implementation experts, developers and anybody in-between. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 5 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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