Expand my Community achievements bar.

SOLVED

Sightly Expression Is Giving Empty Value when passed to CSS method

Avatar

Level 9

Hi All,

I am seeing issue with sightly expression evolution that it's giving a empty value when it's part of CSS's method.

<div class="showcase-basic" style="background-image: url('${homePageBannerComponent.fileReference}')">

Where as if i retrieve the independently it's returning correct value.

Image:${homePageBannerComponent.fileReference}

What's causing the issue and preventing to get this value.

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Level 10

This should work

<div class="showcase-basic" style="background-image: url(${properties.text @ context='uri'})"> Image </div>

** Replace properties.text with homePageBannerComponent.fileReference

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

This should work

<div class="showcase-basic" style="background-image: url(${properties.text @ context='uri'})"> Image </div>

** Replace properties.text with homePageBannerComponent.fileReference