Use a field for FeaturedText instead of a body slice #10774
Labels
improvement ✨
A change made to an existing part of the product to try raise the baseline KPIs.
prismic
anything to do with our use of Prismic
Remove the featured label from the text slice and have a separate field for the featured text on custom types that require it. The featured text doesn't feel like it should be a slice as there should only be one on a page and the logic around how and when it displays is not obvious to content editors. For example, if a text slice has a featured label but is not the first slice, then it is not rendered at all.
Background
What is AdditionalContent used for?
The AdditionalContent component is used to shoehorn content, that can't/shouldn't be added as a slice, into the component, so that it can be rendered among the body slices.
It can display 3 things:
Any static content that belongs on the page.
This is only use by the /collections and /visit-us pages.
On /collections page it is used to display the search form.
On the /visit-us page it is used to display the address and opening times.
The OnThisPageAnchors if they are required.
These show if the showOnThisPage is set to true in Prismic and there are more than 2 links to display.
If the page is a landing page, then we display the content from ContentList body slices here (with a bespoke layout) and don't render them as part of the body.
Where we do this:
Visit us /pages/X8ZTSBIAACQAiDzY
Library facilities - not used for Additional content in this way
Get involved /pages/YDaZmxMAACIAT9u8
Young people /pages/Wuw2MSIAACtd3Ssg
Collections /pages/YBfeAhMAACEAqBTx
About us /pages/Wuw2MSIAACtd3Stq - not used for Additional content in this way
N.B. AdditionalContent may not be the appropriate name for this. I think originally it was used only for the static content, but it's role has expanded.
Where/how is it rendered?
The AdditionalContent is rendered one of two ways.
If there is no body content, then it is rendered straight to the page.
If there is body content it is rendered inside the body.map(). This is because we want it to appear beneath FeaturedText, if there is any FeaturedText. This is refactored in #10773, we don't need to render it inside the body.map()
The text was updated successfully, but these errors were encountered: