La fonction de suggestion automatique permet d'affiner rapidement votre recherche en suggérant des correspondances possibles au fur et à mesure de la frappe.
The featured image on a blog post is used in the hero section. I have created this image widget so that a user can select a smaller image that can be used on the listing template.
To get the above widgets value, I'm doing the following:
{% for content in contents %}
{{ content.widgets.listing_image.body.value.src }}
{% endfor %}
However, the value it returns is empty. I have also tried:
{{ content.widgets.listing_image.body.value }}
Same results, it is empty.
How do I get the value of the widget on my post template and use it on the listing template?
If you're not getting the result/data you expect it's sometimes helpful to console log a part of a method/dict which will help you find the structure you need to get what you want. e.g. the below will console log the widget data which you can then read to find out which object src is in.
If you're not getting the result/data you expect it's sometimes helpful to console log a part of a method/dict which will help you find the structure you need to get what you want. e.g. the below will console log the widget data which you can then read to find out which object src is in.