Hi Christian,
You can implement a getBreadCrumbs() method in the delegate class which returns the *path* to the current record. It must return an associative array representing the breadcrumbs.
e.g.
- Code: Select all
function getBreadCrumbs(&$record){
return array(
'Home' => DATAFACE_SITE_HREF,
$record->val('countryName') => $record->val('countryRecord')->getURL(),
$record->val('provinceName') => $record->val('provinceRecord')->getURL(),
$record->val('cityName') => $record->val('cityRecord')->getURL(),
$record->getTitle() => $record->getURL()
);
}
Notes about this snippet.
1. I am using object chaining (PHP5 only)
2. The keys of the array represent the labels for the breadcrumbs.
3. The values of the array represent the link urls for those labels.
4. I am making reference to calculated fields that you would need to define (e.g. cityName, provinceName, countryName), but this is just an example of what can be done.
Hope this makes sense.[/list]