Using a custom module field for blog post in the listing template

Hi

I have a created a custom module on the blog post template that has a boolean field named ‘darken_listing_image’.

I want to bring this variable in to my listing template so I can apply some conditional styling. I’ve tried this within my content loop but it doesn’t seem to be working:

{{ content.widgets.module_151618187561037.body.darken_listing_image.value }}

the module ID obviously relates correctly. Can anyone point me in the right direction please?

Thanks

Hi @DM2
I am Bit confused with
boolean field named ‘darken_listing_image’.

{{ content.widgets.module_151618187561037.body.darken_listing_image.value }}

Please confirm it’s Boolean or image field, it seems you want to show the additional image on Blog Listing Post Items?
Please let me know the scope in Brief.
Thanks!

Hi @psdtohubspot

Yes it’s a boolean field that alters the way the feature image is displayed in the blog listing page - if true there is a darken filter added.

At the moment I’m just trying to get it to display ‘true’ in the listing.

{{ content.widgets.module_151618187561037.body.darken_listing_image.value }}

Once I can see that I’ll use an if statement to apply the class.

Thanks for any help.

Pleased to say this worked (removed “.value” from the end):

{{ content.widgets.module_151618187561037.body.darken_listing_image }}