How does routing work within a class extended from ModelAdmin and Gridfield?
Eg.
At the top of the CMS page is a set of breadcrumbs – the CMSBreadcrumbs template loops $Breadcrumbs, calling $Link.
I have MyModelAdmin extended from ModelAdmin. It manages classes A, B and C, all extended from DataObject.
Class A has many B .
Class B has one A, many C
Class C has one B
Does the $Link in the CMSBreadcrumbs come from each DataObject? Does it come from MyModelAdmin?
If I click on my module, there is no breadcrumb.
If I click on Class A; the $Link in the breadcrumb is perfect. (one link)
I click on one of the instances of class B in the Gridfield, and the breadcrumb changes so that the vendor folder name is repeated twice (in both links).
I click on one of the instances of class C in the Gridfield and the breadcrumbs change again and the vendor folder name is repeated thrice.
If I copy the link and remove the excess vendor folder names the link works. Without that modification, the link doesn’t work. Where does the extra vendor folder names come from?
Do I need to set my own Link()? If so, where? How?