I’m using
$breadcrumb = '';
foreach($result->parents()->flip() as $parent) {
echo $parent->title()->html(). ' » ';
}
The issue is that it shows the whole family like this
Airline » Airline List » D » Delta »
I just want to show the parent. Delta.
1 level. Any thoughts or idea.
Thanks
Try:
$breadcrumb = '';
foreach($result->parents()->first() as $parent) {
echo $parent->title()->html(). ' » ';
```
this breaks the code. The page then shows no results.
I went to this.
echo html($page->parent()->title());
But it shows the very beginning parent. All the way down the line. When I did flip, which didn’t work in this situation. It didn’t work. Any thoughts.
I used
echo html($result->parent()->title()->flip());
Changed page with result. This worked.
/// Please mark as solved.