Page header plugin - new component?
Subject of the enhancement
The current implementation of the page header concept in Adapt blurs the lines between component and theme. The traditional approach has been to use the theme to style the space at the top of the page using a mix of CSS, JS, and JSON properties. Whilst this has proven to work thus far, I feel that a dedicated plugin would be easier for users new to Adapt to understand as it'll:
- separate out contentObjects to be menu items (or menus) and components to be the content that renders within those items
- allow users to easily define different titles and body text on pages compared to menu items
- allow users to not define page headers should they wish
- provide a cleaner base to build from
Your environment
- v5 FW / AT
Proposed solution
Create a new page-header plugin that provides the everything the current Vanilla plugin does (background image, background styles, minimum heights) and formalise support for a text only layout and a background image layout, configurable for both Framework and Authoring Tool users.
https://github.com/cgkineo/adapt-pageHeader
Linked page header plugin (above) provides the following layouts:
- Image (within content width) with text overlaid
- Image (within content width) with text below
- Image (outside of content width) with text text overlaid
- Image (outside of content width) with text below
Update with menu related bits
Latest suggestion is to turn menus into pages, such that menus are pages which have other pages as children. Need to investigate.
That way the page header would also be useable in the menu.
There are some options:
- Drop menus altogether and allows pages to have contentobject as children
- Keep menus and allow article/blocks and components as well as contentobject children
Need to look at:
- AAT user interface and how that would work (Kirsty/Tom)
- Styling conflicts between page and menu (Kirsty)
- JSON checking (Ollie)