{if $attachment instanceof \openvk\Web\Models\Entities\Photo} {if !$attachment->isDeleted()} {var $link = "/photo" . ($attachment->isAnonymous() ? ("s/" . base_convert((string) $attachment->getId(), 10, 32)) : $attachment->getPrettyId())} {else} {/if} {elseif $attachment instanceof \openvk\Web\Models\Entities\Video} {if $attachment->getType() === 0}