{"id":23326705,"url":"https://github.com/kentico-ericd/xperience-core-breadcrumbs","last_synced_at":"2025-08-02T12:37:15.632Z","repository":{"id":39878266,"uuid":"316061612","full_name":"kentico-ericd/xperience-core-breadcrumbs","owner":"kentico-ericd","description":"An Xperience page builder widget which automatically generates breadcrumbs for your .NET Core live site","archived":false,"fork":false,"pushed_at":"2023-11-17T23:54:13.000Z","size":241,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-13T11:27:32.622Z","etag":null,"topics":["breadcrumbs","kentico-xperience","navigation","net-core","xperience"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kentico-ericd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-25T21:53:19.000Z","updated_at":"2024-11-14T15:01:49.000Z","dependencies_parsed_at":"2024-12-20T19:29:38.520Z","dependency_job_id":"b5503672-beb3-4d04-876e-ee94cbec5abf","html_url":"https://github.com/kentico-ericd/xperience-core-breadcrumbs","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentico-ericd%2Fxperience-core-breadcrumbs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentico-ericd%2Fxperience-core-breadcrumbs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentico-ericd%2Fxperience-core-breadcrumbs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kentico-ericd%2Fxperience-core-breadcrumbs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kentico-ericd","download_url":"https://codeload.github.com/kentico-ericd/xperience-core-breadcrumbs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247608636,"owners_count":20966052,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["breadcrumbs","kentico-xperience","navigation","net-core","xperience"],"created_at":"2024-12-20T19:28:43.160Z","updated_at":"2025-04-07T07:22:59.834Z","avatar_url":"https://github.com/kentico-ericd.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Nuget](https://img.shields.io/nuget/v/Xperience.Core.Breadcrumbs)](https://www.nuget.org/packages/Xperience.Core.Breadcrumbs)\n![build](https://github.com/kentico-ericd/xperience-core-breadcrumbs/actions/workflows/build.yml/badge.svg)\n\n# Xperience 13 .NET Core Breadcrumb Widget\n\nThis is a widget for Xperience .NET Core websites which use [Content Tree-Based routing](https://docs.xperience.io/developing-websites/implementing-routing/content-tree-based-routing).\n\n![screenshot](screenshot.png)\n\n## Installation\n\n1. Install the [Xperience.Core.Breadcrumbs](https://www.nuget.org/packages/Xperience.Core.Breadcrumbs) NuGet package in your .NET Core application\n2. Register the breadcrumbs in your application startup:\n\n```cs\nusing Xperience.Core.Breadcrumbs;\n\npublic void ConfigureServices(IServiceCollection services) {\n    // Use default properties for all breadcrumbs\n    services.AddBreadcrumbs();\n\n    // Or, use these properties for all breadcrumbs\n    services.AddBreadcrumbs(options =\u003e {\n        options.Separator = \"|\";\n        options.ShowContainers = true;\n        options.ShowSiteLink = true;\n        options.ContainerClass = \"breadcrumbs-widget\";\n        options.BreadcrumbItemClass = \"breadcrumb-item\";\n        options.CurrentPageClass = \"breadcrumbs-current\";\n    });\n```\n\n## Using the breadcrumbs\n\n### Adding the pagebuilder widget\n\nThe breadcrumbs widget can be added to any page which uses the [page builder](https://docs.xperience.io/developing-websites/page-builder-development/creating-pages-with-editable-areas). It has 6 properties:\n\n- **Show domain link first**: Displays the site name and a link to the root of the site as the first breadcrumb item\n- **Show container page types**: If checked, pages that use container page types (e.g. a Folder) will appear in the breadcrumbs\n- **Separator**: The text to add between each breadcrumb item\n- **Container class**: The CSS class(es) to add the `div` that surrounds the breadcrumbs\n- **Item class**: The CSS class(es) added to all breadcrumb items\n- **Current page class**: The CSS class(es) add to the current page\n\n### Adding breadcrumbs to views\n\nYou can also add the widget directly to any view, such as the main _Layout.cshtml_:\n\n```cs\n@using Xperience.Core.Breadcrumbs\n@inject BreadcrumbHelper breadcrumbHelper\n...\n@breadcrumbHelper.GetBreadcrumbs()\n```\n\nTo override the properties registered during application startup, pass a new `BreadcrumbsWidgetProperties` instance:\n\n```cs\n@breadcrumbHelper.GetBreadcrumbs(new BreadcrumbsWidgetProperties()\n{\n    Separator = \"|\",\n    ShowContainers = true,\n    ShowSiteLink = true,\n    ContainerClass = \"my-breadcrumbs\",\n    BreadcrumbItemClass = \"breadcrumb-item\",\n    CurrentPageClass = \"breadcrumbs-current\"\n})\n```\n\n## Customizations\n\n### Breadcrumb rendering\n\nThe final HTML of your breadcrumbs is determined by the `IBreadcrumbsRenderer` interface, which you can find the default code for in [DefaultBreadcrumbsRenderer](/src/Xperience.Core.Breadcrumbs/Services/DefaultBreadcrumbsRenderer.cs). If you'd like to customize the HTML of the breadcrumbs, you can implement your own `IBreadcrumbsRenderer` and use the `RegisterImplementation` attribute to register your code with a higher priority:\n\n```cs\n[assembly: RegisterImplementation(typeof(IBreadcrumbsRenderer), typeof(CustomBreadcrumbsRenderer), Lifestyle = Lifestyle.Singleton, Priority = RegistrationPriority.Default)]\nnamespace MySite.Breadcrumbs {\n    /// \u003csummary\u003e\n    /// Custom implementation of \u003csee cref=\"IBreadcrumbsRenderer\"/\u003e.\n    /// \u003c/summary\u003e\n    public class CustomBreadcrumbsRenderer : IBreadcrumbsRenderer {\n```\n\n### Breadcrumb item generation\n\nBreadcrumb items are provided by the [DefaultBreadcrumbItemMapper](/src/Xperience.Core.Breadcrumbs/Services/DefaultBreadcrumbItemMapper.cs). If you would like to modify how the breadcrumb names, URLs, etc. are generated, you can implement your own `IBreadcrumbItemMapper` and use the `RegisterImplementation` attribute to register your code with a higher priority:\n\n```cs\n[assembly: RegisterImplementation(typeof(IBreadcrumbItemMapper), typeof(CustomBreadcrumbItemMapper), Lifestyle = Lifestyle.Singleton, Priority = RegistrationPriority.Default)]\nnamespace MySite.Breadcrumbs\n{\n    /// \u003csummary\u003e\n    /// Custom implementation of \u003csee cref=\"IBreadcrumbItemMapper\"/\u003e.\n    /// \u003c/summary\u003e\n    public class CustomBreadcrumbItemMapper : IBreadcrumbItemMapper {\n```\n\n## Compatibility\n\nThis code is only available for use on Kentico Xperience 13 websites using the [.NET Core development model](https://docs.xperience.io/developing-websites/developing-xperience-applications-using-asp-net-core). The website must be using the [content tree-based routing](https://docs.xperience.io/developing-websites/implementing-routing/content-tree-based-routing) model for the breadcrumbs to display properly.\n\n## Feedback \u0026 Contributing\n\nCheck out the [contributing](https://github.com/kentico-ericd/xperience-core-breadcrumbs/blob/master/CONTRIBUTING.md) page to see the best places to file issues, start discussions, and begin contributing.\n\n## License\n\nThe repository is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentico-ericd%2Fxperience-core-breadcrumbs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkentico-ericd%2Fxperience-core-breadcrumbs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkentico-ericd%2Fxperience-core-breadcrumbs/lists"}