Important: Profile names leave out empty parts 

Description 

The templates composed the name of a profile from its title, first name, middle name and last name with a space between every two parts, also when a part was empty. A profile without a middle name was rendered with two spaces between first and last name, and on the detail page a profile without a title started with a space.

The name now leaves out the parts a profile does not have, together with their space:

A profile with all four parts is rendered as before.

Impact 

The page looks the same, browsers collapse the spaces. The markup changes: the heading text and the alt attribute hold the name with single spaces and without a leading space. Code or tests that match the rendered markup may have to be adjusted.

Affected Installations 

Every installation that renders profiles without a title or a middle name. Nothing has to be done on update.

A site that overrides one of the two files keeps the old composition. To take over the change, use these expressions in the copy. In Partials/Profile/Item.html, the header argument of both headings:

header: '{profile.firstName}{f:if(condition: profile.middleName, then: \' {profile.middleName}\')} {profile.lastName}',
Copied!

In Templates/Profile/Detail.html, the header argument and the alt attribute of the image:

header: '{f:if(condition: profile.title, then: \'{profile.title} \')}{profile.firstName}{f:if(condition: profile.middleName, then: \' {profile.middleName}\')} {profile.lastName}',

alt="{f:if(condition: profile.title, then: '{profile.title} ')}{profile.firstName}{f:if(condition: profile.middleName, then: ' {profile.middleName}')} {profile.lastName}"
Copied!