{template="embedHeader" group="embed" app="core" params="$item, $item->mapped('title'), $item->mapped('date'), $url"}
{{if $item->media }}
{{else}} {$item->caption} {{endif}} {template="nsfwOverlay" app="gallery" location="front" group="global" params="$item, FALSE"}
{{if $desc = $item->truncated(TRUE)}}
{$desc|raw}
{{endif}} {{if $item->copyright}}

© {$item->copyright}

{{endif}} {template="embedItemStats" group="embed" app="core" params="$item"}
{{if $item->directContainer() instanceof \IPS\gallery\Album}}
{{$images = \IPS\Gallery\Image::getItemsWithPermission( array( array( 'image_album_id=?', $item->album_id ) ), ( $item->directContainer()->sort_options == 'title' ) ? 'image_caption ASC' : $item::$databasePrefix . $item::$databaseColumnMap[ $item->directContainer()->sort_options ] . ' DESC', 9 );}} {{if \count( $images )}} {{endif}}
{{endif}}