Blocks and z-index

Permalink
I am wanting to create a template that has a background image (editable) and a foreground image (editable).

What is the best way to do this so my client can edit both? I can setup the css to account for z-index but tricky when it comes to edit mode.

thanks

trixiemay
 
MrKDilkington replied on at Permalink Best Answer Reply
MrKDilkington
Hi trixiemay,

You could use Image/File page attributes. In your template, you would check to see if the attribute was set, if so, the image would be used to add CSS to the page for the background image.

If you think that the z-index of the background image CSS would conflict with edit mode, you could display it conditionally. While in edit mode, you would not add the CSS to the page.

Checking for edit mode in a template:
if ($c->isEditMode()) {
    // the page is in edit mode
} else {
    // the page is NOT in edit mode
}
trixiemay replied on at Permalink Reply
trixiemay
Great thanks