Add meta description for posts

This commit is contained in:
Celestora 2022-06-18 15:03:08 +03:00
parent 9da7855926
commit 6413a5c5a4

View file

@ -1,16 +1,21 @@
{extends "../@layout.xml"}
{block title}{_"post"}{/block}
{block headIncludes}
{var $description = iconv_substr(strip_tags($post->getText()), 0, 96)}
<meta n:if="!empty($description)" name="description" content="{$post->getOwner()->getCanonicalName()} {$post->getPublicationTime()}&mdash; {$description}" />
{/block}
{block header}
<a href="{$wallOwner->getURL()}">
{$wallOwner->getCanonicalName()}
</a>
»
<a href="/wall{$wallOwner->getId() * ($isWallOfGroup ? -1 : 1)}">
{_wall}
</a>
»
{_"post"}
<a href="{$wallOwner->getURL()}">
{$wallOwner->getCanonicalName()}
</a>
»
<a href="/wall{$wallOwner->getId() * ($isWallOfGroup ? -1 : 1)}">
{_wall}
</a>
»
{_"post"}
{/block}
{block content}