Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use variations for ContentLists #10775

Open
Tracked by #10789
gestchild opened this issue Apr 9, 2024 · 0 comments
Open
Tracked by #10789

Use variations for ContentLists #10775

gestchild opened this issue Apr 9, 2024 · 0 comments
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

Comments

@gestchild
Copy link
Contributor

ContentLists be made into slice variations, so their layout can be decided in Prismic. We then wouldn't need to render it separately from the rest of the Body in the AdditionalContent component and can simplify the code.

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 being refactored in #10773, so we don't need to render it inside the body.map()

@gestchild gestchild added the prismic anything to do with our use of Prismic label Apr 9, 2024
@gestchild gestchild added the improvement ✨ A change made to an existing part of the product to try raise the baseline KPIs. label Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
Status: Backlog
Development

No branches or pull requests

1 participant