Byline / DocumentByLine#
Overview#
The byline feature shows the author's name, publication date, and last-modified date below the page title. It is implemented as a slot component (DocumentByLine) registered in the belowContentTitle slot. The backend provides author metadata through the byline content expander.
Backend: byline expander#
The backend expander is requested by including byline in the expand query parameter:
GET /path/to/content?expand=byline
Response shape (inside @components):
{
"@components": {
"byline": {
"users": {
"<userid>": {
"fullname": "Jane Smith",
"homepage": "/en/persons/jane-smith"
}
}
}
}
}
users is a mapping from user ID to display data. If a user ID has no entry, the component falls back to rendering the raw user ID.
Frontend: DocumentByLine slot component#
File: frontend/packages/kitconcept-intranet/src/slots/DocumentByLine/DocumentByLine.tsx
Registration:
config.registerSlotComponent({
slot: 'belowContentTitle',
name: 'documentByLine',
component: DocumentByLine,
});
Props#
Prop |
Type |
Description |
|---|---|---|
|
|
Full content object including |
|
|
Array of user IDs |
|
|
ISO 8601 last-modified date |
|
|
If |
|
|
Used to detect add mode |
Behaviour#
Author names: Reads
creatorsfrom Redux form state (form.global.creators) first, falls back tocontent.creators. Resolves each user ID against@components.byline.usersto get the display name; links tohomepageif present.Dates: Shows "published" date when
review_state === 'published'; always shows "last modified" date.Add mode: Component does not render when
location.pathnameincludes/add.Memoisation:
creatorsarray is memoised to prevent re-renders caused by reference changes.
Rendered output (example)#
By Jane Smith · published 8 Apr 2026 · last modified 9 Apr 2026
The byline expander is implemented in kitconcept.intranet at backend/src/kitconcept/intranet/services/byline.py. It is registered as a plone.restapi IExpandableElement adapter and resolves each user ID in content.creators via plone.api.user.get().