Hallo liebe Community,
bei einem Projekt habe ich zum ersten mal die Extension bgm_hreflang genutzt.
Installiere usw. stellte kein Problem da.
Im Backend sehe ich alle benötigten Felder und kann einen Bezug zwischen den Seiten herstellen.
Allerdings bekomme ich bei hreflang="-" keine Sprache angezeigt.
Das Projekt hat ein Multitree Konzept, de (id11) und en (id21).
Das bekomme ich im Quelltext angezeigt:
<link rel="alternate" hreflang="-" href="http://domin.com/de/page-de.html" />
<link rel="alternate" hreflang="-" href="http://domain.com/en/page-en.html" />
In der AdditionalConfiguration.php steht folgendes:
$languageMapping = array(
//"sys_language_uid" and "isolanguagecode" have to be unique in the array $languageMapping!
sys_language_uid => isolanguagecode,
//Example
0 => 'de', //german
1 => 'en', //english
);
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['bgm_hreflang']['countryMapping'] = array(
//"pageid" is the rootpage of a country branch. It has to be unique in the array $countryMapping!
pageid => array(
//"isocountrycode" has to be unique in the array $countryMapping!
'countryCode' => isocountrycode,
//'$languageMapping + array(0 => isolanguagecode)' can be assigned more than once with the same "isolanguagecode" in the array countryMapping.
'languageMapping' => $languageMapping + array(0 => isolanguagecode),
//This is optional. You need this, if you want the Germany country branch to be used as Austrian country branch, too.
//'additionalCountries' => array(isocountrycode, isocountrycode, ...),
),
//Example
11 => array( //Germany
'countryCode' => 'de',
'languageMapping' => $languageMapping + array(0 => 'de'),
),
21 => array( //International
'countryCode' => 'en',
'languageMapping' => $languageMapping + array(0 => 'en'),
),
);
//If $_GET['L']==0, pages in this tree are rendered with hreflang="x-default", else only the isolanguagecode is used (without the isocountrycode)
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['bgm_hreflang']['defaultCountryId'] = 0;
page.headerData.30 = USER
page.headerData.30 {
userFunc = BGM\BgmHreflang\Utility\HreflangTags->renderFrontendList
}
Vielleicht kann mir ja jemand weiterhelfen.
lg
Steppo

