I added a new Image field to my template:
$fields->addFieldToTab("Root.Content.Main", new ImageField("Background_Image_For_Menu"), "Content");
If the value of the field is not empty, I'm changing background image of the div-block.
Here is what I', writing in my Page.ss:
<% if $Background_Image_For_Menu.URL=='' %>
<div class="row columnsOne submenu" style="background-image:url($Background_Image_For_Menu.URL);">
<% else %>
<div class="row columnsOne submenu">
<% end_if %>
The construction doesn't work, I'm just getting an empty page.
Please help! Thank you.