kopia lustrzana https://github.com/wagtail/wagtail
Fix GenericPageBreadcrumbsMixin to correctly take the specified number of items
The old code was taking the N-th item from the view's generic breadcrumbs instead of taking the last N items as the comment suggestspull/12314/head
rodzic
98bbded2a8
commit
05230388d8
wagtail/admin/views/pages
|
@ -66,6 +66,7 @@ class GenericPageBreadcrumbsMixin:
|
|||
# which in most cases is the final item that links to the current view.
|
||||
# However, this can be customised in the case of generic views that are
|
||||
# nested inside another generic view.
|
||||
return self.breadcrumbs_items + [
|
||||
super().get_breadcrumbs_items()[-self.breadcrumbs_items_to_take]
|
||||
]
|
||||
return (
|
||||
self.breadcrumbs_items
|
||||
+ super().get_breadcrumbs_items()[-self.breadcrumbs_items_to_take :]
|
||||
)
|
||||
|
|
Ładowanie…
Reference in New Issue