Profile widget
Overview
You use the Profile widget to preview and edit user profile details. Depending on the widget configuration, you can use the widget for the current user or for any other user.
Place the widget on the page
You can place a Profile widget only inside a Section widget.
To do this, perform the following:
- Inside a column from the Section widget, click Add widget here…
- Select the Login & Users tab.
- Click the PROFILE widget.
The widget is placed inside the selected column of the Section widget.
RESULT: The widget displays the profile information together with Edit profile link.
You can change these labels in the advanced widget settings.
Widget settings
To open the widget settings, perform the following:
- In the page editor, hover over the widget.
- Click the toggle menu in the widget label.
- Click
(Edit).
The Profile page opens.
Configure the mode of the widget
In Select mode section, select one of the following modes:
- Edit mode only
On the frontend, the widget appears with its fields editable.
Choose what to do After saving changes...
Select one of the following:
- View a message
A confirmation message appears.
- Redirect to page...
Click
(Add) to select the page where the user will be redirecting after saving the changes to their profile.
- Read mode only
You can only see the values of the user profile without being able to edit them.
- Both – read mode that can be edited
On the frontend, the widget appears with its fields read-only and an Edit profile link.
Choose what to do After saving changes...
Select one of the following:
- View a message
A confirmation message appears.
- Switch to “Read mode”
The system switches to Read mode after saving the changes to their profile.
- Redirect to page...
Click
(Add) to select the page where the user will be redirecting after saving the changes to their profile.
Configure the display settings
To configure how to display the image in the widget, perform the following:
In Display setting section, you can do the following:
- Change the template
To change the template that the Profile widget uses, select the new template in the Profile template dropdown box.
You must first have created a custom template.
For more information, see ASP.NET Core pages and templates.
- Configure the widget margins
In Margins, you can choose the margins between the text and the column where it is placed.
Choose from the predefined values of none, small, medium, or large.
Save your changes.
Advanced widget settings
To open the advanced settings, in the upper-right corner of the Profile page, click
(Advanced settings).
- In Label, you can enter a specific name for this widget.
This name will be displayed in:
- The page editor as a label for the widget
- In the treeview with the page structure in the right pane of the page editor.
- In CSS class, you can enter individual CSS class for the Profile widget.
- In Labels and messages, you can configure the labels of the widget
Save your changes.
Field validations
You can implement input validation in the Advanced Sitefinity CMS setting.
To configure field validation, perform the following:
- In Sitefinity CMS backend, navigate to Administration » Settings » Advanced.
- In the left navigation, expand ContentView » Controls » ProfileType_SitefinityProfile » Views » ViewFrontendCreate » Sections » CustomFieldsSection » Fields.
- Expand the field where you want to implement validation and click its Validation section.
- Configure the required validation and save your changes.
Custom fields
The Profile widget supports the following custom fields:
ShortText and
DateTime
Yes/No
For more information, see Implement custom fields » Custom fields for Profile widget.