Skip to content

Show profile fields on Pages database records

Articles on blogs and news websites often have an “About the author“ block. Can we replicate that with Pages databases and information that was already added to the profile of the users? Yes, and here is how.

{{if $record->author()->contentProfileFields()['core_pfieldgroups_1']['core_pfield_1']}}
{$record->author()->contentProfileFields()['core_pfieldgroups_1']['core_pfield_1']|raw}
{{endif}}

This code would work on a Pages database display template where the member information can be derived from the $record variable. In a listing template, the $row variable would have to be used.

The code above needs to be adjusted to call the right profile fields. This is done through the number at the of core_pfieldgroups_X and core_pfield_X. Look up the values in the ACP under Member Settings → Profiles. Hover over the Edit button for the group and the profile field and you will find the ID of the group and the field at the end of the URL.

Important Information

We are using functional cookies

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.