Contents |
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]);
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
(
[0] => Array
(
[link] => STRING
[text] => STRING
)
[1] => Array...
)
Elements from the breadcrumb associative array are as follows:
| Element | Description | Example |
| 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;