- Issue created by @dbourrion
- Status changed to Fixed
9 months ago 1:36pm 1 April 2024 - πͺπΈSpain pcambra Asturies
One way to do this without too much coding (but probably template altering) is to add a view or display using https://www.drupal.org/project/views_field_view β , then use the same criteria for filtering that you have on your current view, sort by published or changed, limit the view to show just 1 element and then show the published/changed date with "D, d M Y H:i:s T" format. I think you will need to change the view template so it only shows the content without HTML wrapping.
Alternatively, I've created https://www.drupal.org/project/views_state β to support this with a little bit of glue code, you can add a presave every time the target content for the podcast is updated (normally a content type, in my case named "podcast")
function my_module_node_presave(NodeInterface $node) { if ($node->bundle() == 'podcast' && $node->isPublished()) { \Drupal::state()->set('podcast_last_build_date', date('D, d M Y H:i:s T')); } }
And then use Views State to show that as a field of the view and display it in the Style settings.
Automatically closed - issue fixed for 2 weeks with no activity.