Skip to content

Commit

Permalink
fix(breadcrumb): improved detection for link to self breadcrumb
Browse files Browse the repository at this point in the history
  • Loading branch information
jeabakker committed Jan 15, 2025
1 parent 403c006 commit a84b70a
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions engine/lib/breadcrumbs.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ function elgg_push_entity_breadcrumbs(\ElggEntity $entity): void {
elgg_push_collection_breadcrumbs($entity->type, $entity->subtype, $entity->getContainerEntity());

$link_self = elgg_get_current_route_name() !== "view:{$entity->type}:{$entity->subtype}";
$link_self = $link_self && !elgg_http_url_is_identical(elgg_get_current_url(), $entity->getURL());
if ($link_self) {
elgg_register_menu_item('breadcrumbs', [
'name' => 'entity',
Expand Down

0 comments on commit a84b70a

Please sign in to comment.