mirror of
https://github.com/silverstripe/silverstripe-translatable
synced 2024-10-22 11:05:59 +02:00
Output extra meta tags only when there are any existing translations
This commit is contained in:
parent
0ae31a052e
commit
4324d5b607
@ -1574,7 +1574,7 @@ class Translatable extends DataExtension implements PermissionProvider {
|
||||
function MetaTags(&$tags) {
|
||||
$template = '<link rel="alternate" type="text/html" title="%s" hreflang="%s" href="%s" />' . "\n";
|
||||
$translations = $this->owner->getTranslations();
|
||||
if($translations) {
|
||||
if($translations->count()) {
|
||||
$translations = $translations->toArray();
|
||||
$translations[] = $this->owner;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user