NHSLeadership / nightingale-wp

Other
1 stars 0 forks source link

Allow multiple partnership ribbons #48

Closed Android63 closed 6 years ago

Android63 commented 7 years ago

Allow several different partnership ribbons to be displayed on a site, with different ones for specific pages.

cehwitham commented 7 years ago

@Pro-Paul am I correct in thinking that there should only be one partnership banner at the top of a website but that an additional "in page" banner can be added to pages?

If there is an "in page" banner, should the site level banner be removed or can both display on the same page?

penpadstudio commented 7 years ago

Correct. All scenarios you mention above could be implemented.

cehwitham commented 7 years ago

So we need to provide for:

The last one seems the most tricky to implement. Are we able to check that this will actually be used before we implement it please?

I'd be happy to develop the first three for v1.0.0 as it is essentially two options and they can be used together.

penpadstudio commented 7 years ago

Sorry last scenario is wrong, I miss read. We do not need this last case.

cehwitham commented 7 years ago

So site wide is already done. Happy to discuss options for an "in page" banner @Android63.

Possibly a good case for a shortcode or a gutenberg element or both?

penpadstudio commented 7 years ago

Please take a look at the documented guidance patterns for partnership ribbons (feel free to add notes): https://paper.dropbox.com/doc/Partnership-patterns-eOOWzDLx4QxxtATDQXOGS

Android63 commented 7 years ago

I think a shortcode or gutenberg element is a good idea @cehwitham as it allows maximum flexibility and would enable a website to have different partnership ribbons on different pages without having a cumbersome interface.

cehwitham commented 7 years ago

Should we build it as a shortcode for v1 and consider Gutenberg later as it's not going to be widely used currently.

Android63 commented 7 years ago

Agreed @cehwitham. I suspect that, if the Gutenberg editor becomes de facto in WordPress, there will be a lot of scrambling to convert posts, including tons with shortcodes, so we won't be alone...

Android63 commented 7 years ago

Thinking about this further, I think a widget might be better than a shortcode because the ribbon sits above the page content. Or maybe a widget area that accepts shortcodes. Investigating the options...

Android63 commented 7 years ago

OK, I have this working using custom fields. The admin simply adds a custom field named "partnership_ribbon", with associated text, to each page they want it displayed on. Works nicely.

Android63 commented 6 years ago

Updating to restrict width of page-specific partnership ribbon