I have this in the blog post page template. Basically it should be able to detect the custom page update date that will be use as sorting date of the post in the index page. I am having trouble passing variable effective_date as value.
~~~
{% set effective_date = content.publish_date %}
{% if module.show_custom_update_date %}
{% set effective_date = module.updated_date %}
{% endif %}
{% text “display_date” value=effective_date, export_to_template_context=True %}
<div class=“article-heading-banner”>
<h1 class=“article-title”>{{content.title}}</h1>
<p class=“article-details”><a href=“{{ blog_author_url(group.id, content.blog_post_author.slug) }}”>{{ content.blog_post_author.display_name }}</a> | Published \ {{ content.publish_date | format_date(‘MMMM dd, yyyy’) }}
{% if module.show_custom_update_date %}
{% set update_time = content.updated %}
| Updated {{ module.updated_date | format_date(‘MMMM dd, yyyy’) }}
{% endif %}
</p>
</div>
~~~
This is what I see in the developer info. I am seeing “value”: “effective_date”, instead of the date.
"type_name": "text",
"type": "text",
"name": "module_172082412025471_effective_date",
"parent_name": "module_172082412025471",
"label": null,
"line_number": 6,
"params": {
"parent_widget_container": null,
"tag": "text",
"type": "text",
"value": "effective_date",
"export_to_template_context": true,
"content_editable_values": [
"value"
],
"overrideable": true
},
How can I pass the variable date to index template. Thank you.