Adds a main image format field to the page form of the admin — from hidden to full-screen hero — and the templates that render it.
composer require pushword/advanced-main-image
Globally, or per site in the app configuration:
pushword_advanced_main_image:
advanced_main_image: true # false disables the field
main_image_formats: # translation key => stored value (defaults shown)
adminPageMainImageFormatNormal: 0
adminPageMainImageFormatNone: 1
adminPageMainImageFormat13fullscreen: 2
adminPageMainImageFormat34fullscreen: 3
The value is stored in the page’s mainImageFormat custom property.
The bundle overrides page/page.html.twig; a site overriding it too must keep the switch.
0 (normal) and 1 (none) render through the default page/_content.html.twig.1, page/page_hero.html.twig and page/_content_hero.html.twig take over.