+ Start a Discussion
Himanshu Patel 55Himanshu Patel 55 

how to show a section in Visualforce page based on Boolean field

We have a requirement to show a particular section of VF page to only few Users of Community. I am planning to create a Checkbox field and based on this section will appear.  Below is the VF Code and wanted to show section only if Checkbox is true. 
<div class="rc-grid">
          <article class="rc-card rc-card--b " style="align-items:center;">
            <picture class="rc-card__image rc-padding-top--md">
              <img src="{!URLFOR($Resource.HomeAssets,'./assets/images/Icon_eLearning.png')}" height="100px" width="100px" alt="E-learning Icon" />
            <div class="rc-card__body ">
                <h1 class="rc-card__title rc-delta">{!$Label.pRStart}<br class="rc-xs-up" /></h1>
              <p class="rc-margin-bottom--sm--mobile">{!$Label.pRStartDesc} </p>
            <div class="rc-card__footer ">
                <a href="https://b.rcn.com/login" class="rc-btn rc-btn--one" aria-label="Button">{!$Label.pRStartLogin} </a> <p> or</p> 
                <a href="https://welcome.rc.com/?redirect_uri=https:%2F%2Fb.rc.com%2Fimplicit%2Flogin" class="rc-btn rc-btn--one" aria-label="Button">{!$Label.proRTCreateAccount}</a>

AbhinavAbhinav (Salesforce Developers) 
Hi Himanshu,

I think you have to use rendered attribute .

Please check belo link for reference