Generally, a profile page contains:
- The <breadcrumbs> widget allowing navigation within the Portal pages structure.
- The profile widget intended to display cards with employee information.
The page is located on the dedicated portal node.
Image Modified
Breadcrumbs configuration
To configure breadcrumbs correctly, it is preferable to use the attribute values as in the example below (type these values in the Template field of the <breadcrumbs> widget form):
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
title | breadcrumbs |
---|
linenumbers | true |
---|
|
<div class="portal__breadcrumbs customized">
<breadcrumbs>
</div> |
After that, you can define the breadcrumbs view in the CSS field of this form:
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
title | Breadcrumbs CSS |
---|
linenumbers | true |
---|
|
.customized {
font-family: Tahoma,Verdana,Segoe,sans-serif;
} |
Profile page configuration
Generally, a profile widget looks like a set of cards displaying information about an employee. To use this widget, add it to the appropriate page by selecting from the widget dictionary (select the Profile Widget item from the list).
To add or delete cards, modify a widget template in the Template field. In this example, we add a card displaying some fields related to an employee:
Code Block |
---|
language | xml |
---|
theme | Eclipse |
---|
title | Profile template |
---|
linenumbers | true |
---|
|
<div class="card-header__full__info">
<div class="card-header__full-name">{data.name}</div>
<div class="card-header__job-title">{data.professionalPosition}</div>
<div class="card-header__company">{data.company}</div>
</div> |
After that, define server and client logic for these fields in the Server Script and Client Script fields, respectively.
Code Block |
---|
language | js |
---|
theme | Eclipse |
---|
title | Profile server script |
---|
linenumbers | true |
---|
|
const user = new SimpleRecord('employee');
user.get(ss.getUserID());
data.name = `${user.first_name} ${user.middle_name} ${user.last_name}`;
data.professionalPosition = user.job_title;
data.company = user.getDisplayValue('company'); |