Person’s Contacts on the Page 

Icon of the Person’s Contacts on the Page content element
CType

academiccontacts4pages_list

Plugin

AcademicContacts4pages, plugin List, action ContactsController::listAction()

Set

fgtclb/academic-contacts4pages-list, which the aggregate set fgtclb/academic-contacts4pages includes, see What the sets contain

Person’s Contacts on the Page shows the contact persons of a page: the dean's office on the page of a faculty, the participants on the page of a research project, the student advisers on the page of a study programme. Each contact is rendered as the card of a profile of academic_persons, with the image, the name, the position and the e-mail addresses, phone numbers and addresses of the contract the contact names. The contacts are grouped below the names of their roles.

The header Contacts, then the role heading Head of programme followed by a profile card with image, name, position, office hours and contact details, and the role heading Student advisory service followed by a second card.

The start of a contact list grouped by role: the first two role groups, each with its heading. The contacts without a role follow below the last group.

It is the element for contact persons in the content area of a page. A page layout that shows them in a sidebar or a panel uses the data processor of The contacts in a page template instead, which reads the same contacts.

Where the contacts come from 

The editor assigns contacts in the tab Contacts of a page, or in the tab Linked pages of a contract, see Contact records. Each contact names a contract of a person, an optional role, and which of the e-mail addresses, phone numbers and addresses of the contract to display.

The content element shows the contacts of the page it is stored on, in the order they are sorted on that page. Put it on the page that carries the contacts. A content element shown on another page, through an Insert records element for example, still shows the contacts of its own page. A contact is left out while the contract or the profile behind it is not visible in the frontend.

What it renders 

Each contact is rendered through the partial Contacts/Item.html of this extension, which renders the profile card of academic_persons, see The contact item partial. The name links to the profile detail page that the constant plugin.tx_academicpersons.detailPid of academic_persons names. Whether the names link at all follows the setting plugin.tx_academicpersons.detailLink of academic_persons, Link the names to the detail view of its site set: with none, for a site without profile detail pages, the names of the contacts are shown as text, as in the persons elements. The content element has no option of its own for it. A site that shows the names without a link in the persons elements and wants them linked here sets the plugin setting of this extension in its TypoScript setup:

TypoScript setup
plugin.tx_academiccontacts4pages.settings.detailLink = link
Copied!

The crop variant and the placeholders of the image and the prefix of the phone links come from the constants of academic_persons as well, see the note in What the sets contain.

The headings of the roles take their level from the header layout of the content element. The element is cached with the page. Saving the contacts in the form of their page clears the cache of that page.

Related chapters:

Settings 

The tab Configuration of the content element holds two options.

Show hidden records
Type
checkbox
Default
off

On, the content element shows the contacts of the page that are hidden, and the hidden e-mail addresses, phone numbers and addresses of every contact it shows. Start and stop times, access restrictions and deleted records still apply, and a contact whose contract or profile is not visible is still left out.

The page is cached with the hidden contacts, so every visitor sees them, whatever the preview settings of the backend are. Use it where a page shows what the person records keep hidden elsewhere, an internal phone number for example, which the contact selects as its phone number.

The data processor for page templates has an option of the same name, which is independent of this one, see The contacts in a page template.

Group by role
Type
checkbox
Default
on

Whether the contacts are grouped below the names of their roles.

  • On: one heading per role, each followed by the contacts of that role, then the contacts without a role. The roles follow each other in the order in which they first occur among the contacts of the page. A page on which no contact has a role renders one list without headings.
  • Off: all contacts in one list, in the order they are sorted on the page. A contact with a role shows its role name above its card, in an element with the class ace-role.

Switch it off where the order of the contacts matters more than their roles, or where every contact has a role of its own and a heading per person would repeat the card.

A content element saved before the option existed stores no value for it and reads the TypoScript default, so it keeps grouping:

Shipped TypoScript setup
plugin.tx_academiccontacts4pages.settings.groupByRole = 1
Copied!

A value stored in the content element always wins over it.

Below the header Contacts, hidden ones included, two profile cards side by side, each with its role name above it.

The contacts without grouping: the role name stands above each card. The element of the development instance has Show hidden records switched on as well, as its header says: one of the two contacts is hidden and is shown only because of that option.