function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
WitteWitte 

Hidding a image for a specific user, and show the image for other user.

Hello,

 

Can anyone help me, with hidding a image on the page for one user and show it for another user. im new in this.

Can anyone help me?

 

thanking you in front.

Paul

Best Answer chosen by Admin (Salesforce Developers) 
bob_buzzardbob_buzzard

The <apex:image> component has a rendered attribute.  If you use this in conjunction with the $User global variable, you can conditionally render the image based on some attribute of the user.

 

For example:

 

 

<img id="theImage" src="/img/myimage.gif" width="220" height="55" rendered="{!$User.Username='keir.bowden@googlemail.com'}"/>