Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hello, guys.
How do I insert a background image on my site? I want it to appear on every page.
Thanks
You can add a media picker datatype (make sure its set to single) to your document type then you can render it like so and add your appropriate styles. In this case the "true" will make the property recursive so it will look up the tree for one being set. Its a little different depending on version, but you can find the docs here: https://our.umbraco.com/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Media-Picker/index-v7
@{ var typedMediaPickerSingle = Model.Value<IPublishedContent>("backgroundImageAlias", true); if (typedMediaPickerSingle != null) { <div style="background-image: url(@typedMediaPickerSingle.Url)"></div> } }
Good morning, Amir Khan.
you could demonstrate an example of this configuration.
Thank you for your support.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
Umbraco background image
Hello, guys.
How do I insert a background image on my site? I want it to appear on every page.
Thanks
You can add a media picker datatype (make sure its set to single) to your document type then you can render it like so and add your appropriate styles. In this case the "true" will make the property recursive so it will look up the tree for one being set. Its a little different depending on version, but you can find the docs here: https://our.umbraco.com/Documentation/Getting-Started/Backoffice/Property-Editors/Built-in-Property-Editors/Media-Picker/index-v7
Good morning, Amir Khan.
you could demonstrate an example of this configuration.
Thank you for your support.
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.