forked from Wavyzz/dolibarr
Merge branch '12.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/variants/class/ProductCombination.class.php
This commit is contained in:
@@ -157,9 +157,14 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage)
|
||||
$tplcontent .= '<meta name="description" content="'.dol_string_nohtmltag($objectpage->description, 0, 'UTF-8').'" />'."\n";
|
||||
$tplcontent .= '<meta name="generator" content="'.DOL_APPLICATION_TITLE.' '.DOL_VERSION.' (https://www.dolibarr.org)" />'."\n";
|
||||
$tplcontent .= '<meta name="dolibarr:pageid" content="'.dol_string_nohtmltag($objectpage->id).'" />'."\n";
|
||||
// Add canonical reference
|
||||
if ($object->virtualhost) {
|
||||
$tplcontent .= '<link rel="canonical" href="'.(($objectpage->id == $object->fk_default_home) ? '/' : (($shortlangcode != substr($object->lang, 0, 2) ? '/'.$shortlangcode : '').'/'.$objectpage->pageurl.'.php')).'" />'."\n";
|
||||
}
|
||||
// Add translation reference (main language)
|
||||
if ($object->isMultiLang()) {
|
||||
// Add myself
|
||||
$tplcontent .= '<?php if ($_SERVER["PHP_SELF"] == "/'.$objectpage->pageurl.'.php") { ?>'."\n";
|
||||
$tplcontent .= '<link rel="alternate" hreflang="'.$shortlangcode.'" href="'.(($object->fk_default_home == $objectpage->id) ? '/' : (($shortlangcode != substr($object->lang, 0, 2) ? '/'.$shortlangcode : '')).'/'.$objectpage->pageurl.'.php').'" />'."\n";
|
||||
|
||||
// Add page "translation of"
|
||||
@@ -194,10 +199,7 @@ function dolSavePageContent($filetpl, Website $object, WebsitePage $objectpage)
|
||||
}
|
||||
}
|
||||
else dol_print_error($db);
|
||||
}
|
||||
// Add canonical reference
|
||||
if ($object->virtualhost) {
|
||||
$tplcontent .= '<link rel="canonical" href="'.(($objectpage->id == $object->fk_default_home) ? '/' : (($shortlangcode != substr($object->lang, 0, 2) ? '/'.$shortlangcode : '').'/'.$objectpage->pageurl.'.php')).'" />'."\n";
|
||||
$tplcontent .= '<?php } ?>'."\n";
|
||||
}
|
||||
// Add manifest.json on homepage
|
||||
$tplcontent .= '<?php if ($website->use_manifest) { print \'<link rel="manifest" href="/manifest.json.php" />\'."\n"; } ?>'."\n";
|
||||
|
||||
Reference in New Issue
Block a user