You are here

seoHrefLangIsNotDefinedForOurPage

Used by the following Containers: 
Variable Type: 
Custom Javascript
When Defined, HrefLangs must always report on the visited page, defining its URL and Language or Lang+Geo target. Almost exactly the same as a canonical
	function() {
  	var seoHrefLangIsDefined = {{seoHrefLangIsDefined}};

	if (seoHrefLangIsDefined) {
      	// the seed data
      	var seoHrefLang = {{seoHrefLang}};
      	var seoHrefLangLength = {{seoHrefLangLength}};
		var seoUrlCurrentStrippedParameter = {{seoUrlCurrentStrippedParameter}};
		// default result
      	var seoTestHrefLangIsNotDefinedForOurPage = true;
      	var i;
		for ( i = 0; i < seoHrefLangLength ; i++ ) {
          	if ( seoHrefLang[i].href == seoUrlCurrentStrippedParameter ) {
				seoTestHrefLangIsNotDefinedForOurPage = false
            }
      	}
      	return seoTestHrefLangIsNotDefinedForOurPage;
	} else {
		return undefined;
	}
}