Grab Textarea Widget data from single blog post template
SOLVE
Hi,
I have a banner in my blog template, in this banner there is a textarea widget declared like so -
{% textarea "banner_top_text" label='Articles First Paragraph', value='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a urna quis lacus vehicula rutrum.', no_wrapper=True %}
I was wondering how I could pull the data from this widget and display it in a block on the listing page where I pull in a post with the topic 'featured post', which currently looks like -
Mar 19, 20198:08 AM - edited Mar 19, 20198:10 AM
Contributor | Gold Partner
Grab Textarea Widget data from single blog post template
SOLVE
Sure.
So in my listing template I have the textare widget setup so it's displaying in the template and is set when creating a new blog post using this syntax -
<p> {% textarea "banner_top_text" label='Banner paragraph/Summary Content', value='Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aenean a urna quis lacus vehicula rutrum.', export_to_template_context=True %} {{ widget_data.banner_top_text.value }} </p>
And then within the Listing Banner module, which is located in the list template, I have this -