{template="embedHeader" group="embed" app="core" params="$item, $item->mapped('title'), $item->mapped('date'), $url"}
{{if $item->record_image}}
{{$image = \IPS\File::get( "cms_Records", $item->record_image );}}
{{elseif $contentImage = $item->contentImages(1)}}
{{$attachType = key( $contentImage[0] );}}
{{$image = \IPS\File::get( $attachType, $contentImage[0][ $attachType ] );}}
{{endif}}
{{if $image}}
{{endif}}
{$item->truncated(TRUE)|raw}
{{if \count( $item->customFieldsForDisplay('listing') )}}
{{foreach $item->customFieldsForDisplay('listing') as $fieldId => $fieldValue}}
{{if $fieldValue}}
{$fieldValue|raw}
{{endif}}
{{endforeach}}
{{endif}}
{template="embedItemStats" group="embed" app="core" params="$item, $item::database()->options['comments']"}