Hello,
how to formating a date string from a structur field ?
<?php
$exposition_data = $page->exposition()->yaml();
$exposition_count = $page->exposition()->toStructure()->count();
foreach($exposition_data as $exposition_data_list):
//echo $exposition_data_list[date_e];
echo date('Y',$exposition_data_list[date_e]);
echo $exposition_data_list[name_e];
echo $exposition_data_list[location_e];
echo $exposition_data_list[galerie_e];
endforeach ?>
output
1970
blueprint
exposition:
label: Exposition
type: structure
style: table
fields:
date_e:
label: Date
type: date
name_e:
label: Name
type: text
galerie_e:
label: Galerie
type: text
location_e:
label: Location
type: text