Page 1 of 1

Container background image from database

Posted: Sat Dec 09, 2017 3:30 am
by Deon

Hi

I am currently using css for my container backgrounds. This is very static.

I would like my container backgrounds to be dynamic by pulling the background image from the database. I do not see that it is possible to map from the database as there is no option to map the container.

Is there a way to achieve this?


Container background image from database

Posted: Mon Dec 11, 2017 6:22 am
by Serhii Kulibaba

Hello Deon,

You are right, the is no such a feature in the Appery.io platform. Please use the custom JS code for that functionality. It has to have the same CSS selector as you use in your CSS code, like:

pre$("my-selector"). css("background", myImage);/pre

Here my-selector is the CSS selector you already use

myImage is the full link to your image from the database


Container background image from database

Posted: Mon Dec 11, 2017 1:59 pm
by Deon

Perfect, thank you!