I want to add crumb/breadcrumb on each of search result item.
For example, if I search keyword "dog", the search result should return results as follow.
Dog's Life ($title)
Dog is life. Dog is love... ($snippet)
Home > Article > Dog's Life (the crumb)
Dog Dog Who's There ($title)
Who's there dog? Dog dog dog... ($snippet)
Home > Tips Trick > Dog dog Who's There (the crumb)
Usually I construct the crumb using variable $url from
search_result.tpl.php via function
mytemplate_preprocess_search_result(), implemented in
I create a new variable, $breadcrumb, based on variable
$url and then I call it on
search_result.tpl.php. Then I copy
search_result.tpl.php into my theme folder.
The problem arises when it is no longer achievable to construct crumb from
$url due to circumstances, mostly because of custom breadcrumb that is not related with URL.
Please guide me to achieve that goal, a different approach is welcome. Thanks.