Tasks

Built by: Custom Breadcrumbs

Search for mock: the trail becomes Home › Work › Tasks › mock. Each task below also shows its own trail.

The pattern

Two patterns. Search keyword as the last crumb: a path rule reads the query string with a token, so a filtered listing says what it is filtered on. A trail on every result: each teaser shows the trail of its own page, from the rule that builds it.

When to use it

Search pages and filtered listings, where the keyword is part of where the visitor is; and listings that mix content from different places, where the trail tells the results apart.

How it is configured

  1. At Structure › Custom breadcrumbs, add a rule: Type of breadcrumb set to Path, and Path pattern to /tasks.
  2. Breadcrumb paths:
    <nolink>
    /tasks
    <nolink>
  3. Breadcrumb titles:
    Work
    Tasks
    mock
  4. Extra cache contexts: url.query_args:search. Without it, the trail of the first search is cached and shown for every other.
  5. With no keyword the token is empty and its crumb is skipped, so /tasks reads Home › Work › Tasks.
  6. At Structure › Content types › Task › Manage display › Teaser, enable the Breadcrumbs field. Custom Breadcrumbs adds it to every display of every entity type.

« All breadcrumb patterns