exadium/breadcrumbnavigation

There is no license information available for the latest version (dev-master) of this package.

Self contained Breadcrum Navigation module, allowing you to control the breadcrumbs look and feel using templates, and add additional levels of bread crumbs for e.g. dataobjects.

dev-master 2020-03-24 20:58 UTC

This package is not auto-updated.

Last update: 2021-01-15 00:33:54 UTC


README

Build Status Scrutinizer Code Quality Build Status CircleCI

codecov.io

Latest Stable Version Latest Unstable Version Total Downloads License Monthly Downloads Daily Downloads composer.lock

GitHub Code Size GitHub Repo Size GitHub Last Commit GitHub Activity GitHub Issues

codecov.io

Maintainers

  • Marijn Kampf (Nickname: marijnkampf)

http://www.exadium.com/tools/silverstripe/modules/breadcrumb-navigation/

Sponsored by Exadium Web Development

Introduction

Self contained Breadcrum Navigation module, allowing you to control breadcrumbs using templates, rather than from code.

Requirements

  • SilverStripe Trunk SilverStripe 4.0

For SS 3 version see https://github.com/marijnkampf/Silverstripe-Module-BreadcrumbNavigation/tree/SS3

For SS 2.4 version see https://github.com/marijnkampf/Silverstripe-Module-BreadcrumbNavigation/tree/2.4

Install and setup

  • BreadcrumbNavigation should be in your sites root folder.
  • Set options in your mysite/_config/breadcrumbs.yml
---
Name: my-breadcrumbs-settings
After:
  - exadium-breadcrumbs-settings
---

#Override values here
Exadium\BreadcrumbNavigation\BreadcrumbNavigation:
  includeHome: false
  includeSelf: true
  maxDepth: 10
  stopAtPageType: false
  showHidden: false
  homeURLSegment: home
  • In your template include either: <% include BreadcrumbNavigationTemplate %> or <% include BreadcrumbNavigationTemplateAllLinked %>

Advanced use

If you would like to add additional items to the Breadcrumb trail (e.g. for URL parameter actions) you can use AddBreadcrumbAfter($object) and AddBreadcrumbBefore($object) functions. You only need to define the attributes you use in your templates. These are Link and MenuTitle for the supplied templates. Define isSelf if you are not linking the current page.

	$do = new DataObject();
	$do->Link = $this->Link() . "show";
	$do->MenuTitle = "Menu title";
	$do->isSelf = true;
	$this->AddBreadcrumbAfter($do);