Skip to main content
Hi all

I have overidden a the view of a custom object using a vf page  which has  an apex;chatter component. I have two differnt profiles and both have access to this object and vf page. But for one of the profile, I dont want them to see the chatter feed, but all other tabs and components can be seen. I dont want to deactivate chatter either for that profile because they still need chatter for other objects.

How can this be done?  I thought of using two differnt exactly same vf page and removing chatter from one of them and then crreate a separate vf page just to navigate to that vf page based on the profile condition, but i dont know how to implement it.

Any help would be highly appreciated.

Thank you
7 Antworten
  1. 4. Aug. 2016, 05:54
    Hi Pratima,

    The best way to conditionally display some components on VF page is using Rendered options on Apex Components, please try below sameple code.

     

    <Apex:component rendered="{!if($Profile.Name !='System Administrator',FALSE,TRUE)}" >

    Hope this will help you, do let me know if you need more insight on this. 

    Thanks,

    Gaurav

0/9000