Loading src/EasyBreadcrumbBuilder.php +2 −1 Original line number Diff line number Diff line Loading @@ -817,7 +817,8 @@ class EasyBreadcrumbBuilder implements BreadcrumbBuilderInterface { $links_equal = FALSE; } if ($link1->getUrl()->getInternalPath() != $link2->getUrl()->getInternalPath()) { $validate_urls = $this->config->get(EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS_TEXT_ONLY); if (!$validate_urls && ($link1->getUrl()->getInternalPath() != $link2->getUrl()->getInternalPath())) { $links_equal = FALSE; } Loading src/EasyBreadcrumbConstants.php +5 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,11 @@ class EasyBreadcrumbConstants { */ const REMOVE_REPEATED_SEGMENTS = 'remove_repeated_segments'; /** * Flag for removing repeated identical segments from the breadcrumb ignoring url information. */ const REMOVE_REPEATED_SEGMENTS_TEXT_ONLY = 'remove_repeated_segments_text_only'; /** * Flag for storing absolute path settings. */ Loading src/Form/EasyBreadcrumbGeneralSettingsForm.php +12 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,18 @@ class EasyBreadcrumbGeneralSettingsForm extends ConfigFormBase { '#default_value' => $config->get(EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS), ]; $details_general[EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS_TEXT_ONLY] = [ '#type' => 'checkbox', '#title' => $this->t('Remove repeated identical segments - only validate on the text'), '#description' => $this->t('When removing identical segments only text is matched upon.'), '#default_value' => $config->get(EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS_TEXT_ONLY), '#states' => [ 'invisible' => [ ':input[name="' . EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS . '"]' => ['checked' => FALSE], ], ], ]; $details_general[EasyBreadcrumbConstants::INCLUDE_HOME_SEGMENT] = [ '#type' => 'checkbox', '#title' => $this->t('Include the front page as a segment in the breadcrumb'), Loading Loading
src/EasyBreadcrumbBuilder.php +2 −1 Original line number Diff line number Diff line Loading @@ -817,7 +817,8 @@ class EasyBreadcrumbBuilder implements BreadcrumbBuilderInterface { $links_equal = FALSE; } if ($link1->getUrl()->getInternalPath() != $link2->getUrl()->getInternalPath()) { $validate_urls = $this->config->get(EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS_TEXT_ONLY); if (!$validate_urls && ($link1->getUrl()->getInternalPath() != $link2->getUrl()->getInternalPath())) { $links_equal = FALSE; } Loading
src/EasyBreadcrumbConstants.php +5 −0 Original line number Diff line number Diff line Loading @@ -136,6 +136,11 @@ class EasyBreadcrumbConstants { */ const REMOVE_REPEATED_SEGMENTS = 'remove_repeated_segments'; /** * Flag for removing repeated identical segments from the breadcrumb ignoring url information. */ const REMOVE_REPEATED_SEGMENTS_TEXT_ONLY = 'remove_repeated_segments_text_only'; /** * Flag for storing absolute path settings. */ Loading
src/Form/EasyBreadcrumbGeneralSettingsForm.php +12 −0 Original line number Diff line number Diff line Loading @@ -78,6 +78,18 @@ class EasyBreadcrumbGeneralSettingsForm extends ConfigFormBase { '#default_value' => $config->get(EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS), ]; $details_general[EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS_TEXT_ONLY] = [ '#type' => 'checkbox', '#title' => $this->t('Remove repeated identical segments - only validate on the text'), '#description' => $this->t('When removing identical segments only text is matched upon.'), '#default_value' => $config->get(EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS_TEXT_ONLY), '#states' => [ 'invisible' => [ ':input[name="' . EasyBreadcrumbConstants::REMOVE_REPEATED_SEGMENTS . '"]' => ['checked' => FALSE], ], ], ]; $details_general[EasyBreadcrumbConstants::INCLUDE_HOME_SEGMENT] = [ '#type' => 'checkbox', '#title' => $this->t('Include the front page as a segment in the breadcrumb'), Loading