Site.com designers creating authenticated pages for a community site can display the
current user's information by accessing CurrentUser
namespace expressions.
Required Editions
| Available in: Salesforce Classic |
|
Available for purchase in: Enterprise, Performance, and Unlimited Editions Available (with limitations) in: Developer Edition |
| User Permissions Needed | |
|---|---|
| To build, edit, and manage a community’s Site.com custom pages: |
Create and Set Up Communities OR Site.com Publisher User field enabled on the user detail page AND Site administrator or designer role assigned at the site level |
- Open the page on which you want to display the current community user's information.
- From the Page Elements pane, drag a Content Block or Custom Code page element onto the page.
-
Type {!CurrentUser. and the value that you want to
display.
For example,
{!CurrentUser.firstName}.Check the list of available expressions for displaying current user information.
-
Add any additional text you require.
For example,
Welcome back {!CurrentUser.firstName}!. - If you're in a Content Block, click Save. If you're in a Custom Code element, click Save and Close.
Note If an unauthenticated user views a page that contains
CurrentUser expressions, the current user information does not appear.
For example, if an unauthenticated user viewed a page that contained the previous
example, the user sees “Welcome back !” as the welcome message.