Important: The profile item and list are built from partials
Description
Partials/ and
Partials/ were single blocks. A project that
wanted the academic title in a heading, a different image, its own detail link
or another empty state copied the whole file into its site package - and then
missed every correction made upstream.
Both are now entry points that delegate. Their arguments are unchanged, so an existing copy of either file keeps rendering exactly as it did; it simply does not profit from the split.
The item renders four partials:
| Partial | Renders |
|---|---|
Profile/ | The address of the detail view, as text |
Profile/ | The name, as text |
Profile/ | The contract block |
Profile/ | The image, or the placeholder |
The list renders four more:
| Partial | Renders |
|---|---|
Profile/ | Nothing. It is the override hook for a "showing x of y", and it is handed both numbers |
Profile/ | The heading above one group of a grouped list |
Profile/ | The grid, with its Bootstrap row and column classes |
Profile/ | The text shown when nothing was found |
Profile/ and Profile/ are
what the card, the selected profiles and the selected contracts element render
as well, so an override of either reaches every element of this extension at
once. The selected contracts element passes its contracts to the grid and the
label about contracts to the empty state.
The academic title is part of the name
A profile with a Title now shows it in front of the name in every
item - Prof. Dr. Anna Beispiel rather than Anna Beispiel. The detail view
has always rendered the title, so the item was the inconsistent view.
The name is also joined differently. It used to be written as
{first with literal spaces, so a profile without
a middle name carried two of them in the markup. An empty part is now left out
with its separator.
New classes
Every partial that renders an element of its own carries a speaking class, the
same in the list, the card, the selected profiles and the selected contracts.
The classes academic- and academic- and the
classes of the Bootstrap card, card, card-, card- and
card-, are gone. The classes are listed in the
chapter Styling of this manual.
| Element | Class |
|---|---|
| The item heading | ace-, next to ace- |
| The item image | ace-, in an ace- |
| The group heading of a grouped list | ace-, next to ace- |
| The page navigation | ace- |
| The letter navigation | ace- |
| The item grid, and each of its columns | ace- around a row of col-* columns |
| The empty state | ace- |
What tells the four elements apart is their outermost element,
academic-, academic-, academic-
and academic-.
Profile/, Profile/,
Profile/ and Profile/
have no class of their own: the first two render text, the third renders the
contract partial unchanged, and the fourth renders nothing.
Impact
An installation that overrides no template renders three differences: the
academic title in the item heading where a profile has one, one space fewer in
the name of a profile without a middle name, and the classes listed above in
place of the Bootstrap card classes. A site stylesheet that styled the items
through academic-, academic-, card,
card- or card- moves its selectors to the classes above.
An installation that copied Profile/ or
Profile/ renders exactly what it rendered before. Its
copy does not delegate, so overriding one of the new partials next to it has no
effect - drop the copy and keep the small override instead.
One variable of the item was renamed while the arguments stayed: the item used
to define detail before it rendered Profile/,
which receives all of them, and now defines detail instead. Nothing
shipped read it; a project copy of the contract partial that did has to follow.
A project that renders profile items in a template of its own can now pass the detail page explicitly:
<f:render
partial="Profile/Item"
arguments="{
profile: profile,
settings: settings,
data: data,
detailPid: 42
}"
/>
The passed page wins over plugin..
Affected Installations
Every installation that shows profiles through the list, list-and-detail, card,
selected-profiles or selected-contracts element, or through the contacts element
of EXT:.
Two cases need a look:
- A project that added the academic title to the name in a copy of
Profile/now has two places doing it. Drop the copy.Item. html EXT:resolves the partials through partial root paths of its own. A project override has to be registered foracademic_ contacts4pages plugin.as well, exactly as it always had to be for a copy of the item.tx_ academiccontacts4pages. view. partial Root Path