This is a workaround for a limitation of Canvas.
Ideally, the date
prop of the hero-blog component would accept a simple Y-m-d string. Unfortunately, when you're mapping a timestamp field (like created
) into that prop, all you've got is a timestamp.
Canvas has a way to convert prop values (adapters) but they're not yet supported and they won't be in time for 1.0. Trying to use them will result in a crashing UI in some situations.
So we have to map the timestamp directly into the prop. Unfortunately, Twig has no way to convert a timestamp to a formatted date because it passes raw date values into strtotime(), so we'll have to implement a pre-render callback that converts this prop, if it is an integer, to a Y-m-d value that can be passed to Twig's date filter.
Fixed
1.0
Canvas integration
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
No activities found.