govuk_publishing_components
govuk_publishing_components copied to clipboard
Add handling of for_static parameter
- original behaviour was to always include wrapper class unless show_account_layout or custom_layout was present (custom layout is as of yet not used). Alter behaviour so that default is not to have the wrapper, and it's only included if for_static is true.
What
Why
layout_for_public does not behave like a standard layout - it's default is to include a wrapper element which is cut out by slimmer and replaced with the wrapper from the client app. If we try to use layout_for_public directly, this results in a double wrapper (or a single wrapper, but without the ability to add classes to it). Adding a parameter which maintains this behaviour (which can be added in Static: https://github.com/alphagov/static/pull/3440 ), but defaulting to not including the wrapper element allows other apps to use the layout component directly.
https://trello.com/c/COQYfYgn/347-allow-layoutforpublic-to-work-like-a-normal-layout
Visual Changes
None expected