In all the documentation and examples I’ve seen (well, probably most, at least), breadcrumbs are rendered in the main layout file and the ‘data’ to the breadcrumbs widget, in the form of an array, is prepared in the specific view file being used.
Now, I was wondering why are the breadcrumbs being prepared in a view file? It seems (to me) that a more proper place for it would be in the action that is in charge of rendering that view file. View file should contain minimal php logic and since the breadcrumbs is not even rendered there, why not locate the preparation of the controller.links array in the controller?
I see indeed that there is no conclusive answer and probably not many consideration that slipped my thought on this.
Compiling your feedback, my current thoughts are:
Calculating the links array, which involves using createUrl and possibly other calculations, as well as the whole determination of breadcrumbs, is a kind of logic that fits better in an action method than in a view file.
Controlling visual aspects of the page, including translation of breadcrumb strings, right along setting title and other front-end-related issues, seems logical to be made in the view part of the application (=view files).
In my personal taste and for the project I’m currently working on, the first bullet weight is greater than the second bullet so I prefer setting breadcrumbs in the action method.