What possibilities does the layout function offer to assign a background image to a <section>
element?
For this function, I “abuse” the layout settings., but it has a drawback (more on that later):
- I create a new 1-column layout.
- In the layout settings, I select an image and specify other settings, including a parallax effect and image darkening
This works perfectly and the background image is displayed:
<section class="parallax" data-parallax-background-ratio="0.5" style="background-image:url('http://localhost:8888/mylocalfolder/media/site/2216db88ad-1695359027/background.jpg')">
Now I come to the downside:
In the panel, the layout looks empty, because the configuration was done exclusively under the settings.
So I can’t see if a background image was assigned to the layout yet.
And the image is not displayed as a preview either. This is not optimal.
Question:
Did I choose the wrong way to do this?
Have I made things unnecessarily complicated for myself?
Is there a better way to do this?
I do not show the codes of the Blueprint and Template here, because my question is oriented to the approach. My solution works, but it is not perfect.