retrieves data to be used to build breadcrumbs. Breadcrumbs are qualified by traversing the parents, grandparents, great grandparents and so forth until the top level is reached.
$arrBreadCrumbs = eV::pageBreadcrumbFamilyGet($pageId[,$templateIdList]);
- $pageId INT
- the unique pageid that will be the breadcrumb target.
- $templateIdList STR (optional)
- Comma delimited list of templateIds that qualify a breadcrumb: if passed, only pages that are using a template from the list can be breadcrumbs. This is useful for filtering out cross sell relationships which qualify as children to product pages.
Returns a multidimensional array where the first dimension is an indexed array of breadcrumbs, the second dimension is an associative array of breadcrumb data.
The returned array is as follows:
Array (  => Array ( [link] => STRING [text] => STRING )  => Array... )
Elements from the breadcrumb associative array are as follows:
|link||String: absolute URL link to the target breadcrumb's page||/index.php?pageId=124|
|text||String: the designated breadcrumb value for the target breadcrumb page.||Category X|
// get the breadcrumb data $arrBreadcrumbs = eV::pageBreadcrumbsFamilyGet($pageId); // display breadcrumbs // place home page at beginning echo "<a href=\"index.php\">Home</a>"; //traverse breacrumbs and display foreach($arrBreadcrumbs as $breadcrumb) echo " > <a href=\"" . $breadcrumb['link'] . "\">" . $breadcrumb['text'] . "</a>"; // place breadcrumb value for current page at end echo " > " . $breadcrumb;