Configurable BackGround

Hello, I need to make a configurable background (admin chooses his required background), but the background is a class made by sass! any idea?
1 answers

Wow, where to start :) Let me try my best here,

1. Create an entity to allow admin to config and create pages for the same.

  1. Calculated attribute MF for Background URL → expression $AppURL+'/file?guid='+$GUID+'&changedDate='+dateTimeToEpoch($BackgroundConfig/changedDate)+'&'+'name='+$BackgroundConfig/Name
  2. 3. Download Javascript snippet from Appstore by Incentro and model a snippet as such
  1. Configure a variable in JS Snippet like below


JS Code for your reference:

var a = document.getElementsByClassName('region-content');

Let me know if this helps, worked for me atleast when tried. Good Luck.