Adding a background for a template

Permalink
I want to create a template for a block (not a theme).

I have copied the view.php from the concrete folder into the root/blocks/content/templates/<name> folder however I didn't find a view.css so I couldn't copy this file.

All I want to do for this template is set a background image. Now I am new to Concrete5, so I don't really know how to go about this.

If I create a new view.css file in that folder, is it just like any normal .css file?

And how do I load it from the view.php file?

Kind Regards

 
JohntheFish replied on at Permalink Reply
JohntheFish
If you create the view.css file in the same folder as the rest of your block, C5 will find it and load it in the page when you use the block.
The rest is (as I expect you already know) just you wrapping your block in a suitable html tag and assigning a background to the tag. Paths in view.css are relative to the view.css, so if you have an "images/" folder, the path will be "images/background.png" (or whatever file type).