From Whirlwind eCommerce Wiki
Jump to: navigation, search


canonicalUrlTag() returns a string containing the HTML link tag for the selected canonical url for the page. If no url map is selected as the canonical url, the first url map entered for the page will be used. If no url maps are set for the page, than the system link (index.php?pageId=#) will be used.


$canonicalUrlTag = eV::canonicalUrlTag($pageId[,$overrideUrl]);


  • pageId INT
the pageId for the current page. This is already defined as $pageId when a template is processed.
  • overrideUrl STRING
this will override the canonical link creation process, and place this string value into the href attribute for the tag.

Return Values

String containing the HTML link tag for the canonical URL: <link rel="canonical" href="/my-canonical-url-here" />


echo "<html>
echo eV::canonicalUrlTag($pageId);
echo "</head>