How to connect background image to dataset?

I have a Dynamic Items Page and I want a transparent background image, I first tried using an image, but later on found its transparency can’t be changed so I though of using a background image, I’m not able to connect to the dataset. If this is even possible, please can someone show me how to do it.

Hi Balaram,
It’s not yet possible to connect without code, but if you’re willing to write a few lines of code, the following should work.

To get it to work on your site, just change the word ’ pic ’ below to the name of the field in your collection where the image is stored.

$w.onReady(function () {
	$w("#dynamicDataset").onReady(function(){
		$w("Document").background.src = $w("#dynamicDataset").getCurrentItem().pic;
	})
});

Thanks a lot! However, it still isn’t transparent. How do I do that?

Hey
What do you mean by transparent background image? Do you mean a strip with opacity?

Sort of

You can add a strip with columns and then change background image on that column

You can do it at the page level too - set the opacity once in the editor and any change to image source should preserve the same opacity:

The filler image (default) is transparent; however, when I change the image src, it isn’t transparent.

Hmmmf, that’s a bug. Thanks for the catch!

I see, do you know when it might get fixed?