Skip to content

Commit

Permalink
Output extra meta tags only when there are any existing translations
Browse files Browse the repository at this point in the history
  • Loading branch information
michalkleiner committed Aug 4, 2016
1 parent 0ae31a0 commit 4324d5b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion code/model/Translatable.php
Original file line number Diff line number Diff line change
Expand Up @@ -1574,7 +1574,7 @@ function AllChildrenIncludingDeleted($context = null) {
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;

Expand Down

0 comments on commit 4324d5b

Please sign in to comment.