how to make a block type with simple background image

Permalink
hi,

i am learning about making my own block types so i use designer content as a starter but i am struggling to make the following work:

in html there is just an empty <section> with a class off "wallpaper", where
wallpaper refers to a css background image like

background: url (img/wallpaper1.jpg) no-repeat center center #000;
background-size: cover;
height: 350px;

so what i want to do is that the user can change the background image by uploading a new one into the block...

but in Designer Content there is no option for this as it only handles html images...so how can i achieve this?

another question is where i should store the background images..in the themes folder or in the folder where the File Manager is storing the images.

thanks

 
jagd replied on at Permalink Reply
jagd
You just need to create custom template for your block, where background will be taken from value of attached picture, uploaded using content designer form.

As background url attribute you need to use

<?php echo $field_xx_image_externalLink; ?>

(exact value you need to take from view.php file of your D.C. block)
It should work.