Created
April 8, 2023 14:18
-
-
Save joekolade/05b975dbe04801bcd049eea687eee5cf to your computer and use it in GitHub Desktop.
[Page background with image]
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NodeTypes.yaml | |
'Neos.NodeTypes:Page': | |
properties: | |
backgroundimage: | |
type: 'Neos\Media\Domain\Model\ImageInterface' | |
ui: | |
label: 'Hintergrund Bild' | |
inspector: | |
group: 'document' | |
editorOptions: | |
features: | |
crop: TRUE | |
resize: TRUE | |
# Root.fusion | |
page = Page { | |
@context.imageUri = Neos.Neos:ImageUri { | |
asset = ${q(node).property('backgroundimage')} | |
} | |
bodyTag { | |
[email protected] = ${value + ' ' + 'background-image: url(' + imageUri + ');'} | |
[email protected][email protected] = ${ q(node).property('backgroundimage') == '' ? false : true } | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment