These are chat archives for
Sign in to start talking
Source code for the Adapt Authoring tool
Sep 19 2017 11:55
i am working on a requirement, every alternative blocks will have a background image.
what i thought is updating the model.schema to get image as input in the block area.
Sep 19 2017 12:02
And, i thought, with the use of 'this.model.get('bgImage')', i can style the block using background-image property in the script file. but i dont know where can i do this.
Sep 19 2017 12:06
That should work if you use Asset:image as the input type
You’ll then have the bgImage attribute as an option on all blocks in the system, that may or may not be a problem
Anything that you add/change in the core schema files will be global
Sep 19 2017 12:09
i got that
i did it in that way only
but where can i access the attributte and write the coding for setting background
normally i used to write the code in the hbs file.
in my requirement i need to style the 'block' with background image property. but the hbs file for blocks is starting with 'block-inner' elmement.
Sep 19 2017 12:14
refer the screenshot
in style attribute, i have to set 'background-image: url('someimg.png').
Sep 19 2017 12:27
the block view renders everything
the top-level block, you won’t be able to access that from inside the handlebars
you’ll have to do it from the view.js, or make-do with the inner
Sep 19 2017 12:46
are you reffering blockview.js
Sep 19 2017 13:23
Probably, I haven’t worked with the framework for a few years. Let me have a look
Sep 19 2017 15:28
, got distracted :sweat_smile:
How did you get on?