logo

📕 Guides

  • Introduction to CubicWeb
    • 1. A little history…
    • 2. The Core Concepts of CubicWeb
  • Tutorials
    • Building a simple blog with CubicWeb
      • Get a blog running in five minutes!
      • Discovering the web interface
      • Customizing your application
      • What’s next?
    • Building a photo gallery with CubicWeb
      • 1. Cube creation and schema definition
      • 2. Security, testing and migration
      • 3. Storing images on the file-system
      • 4. Let’s make it more user friendly
      • 5. Building my photos web site with CubicWeb part V: let’s make it even more user friendly
    • Use Windmill with CubicWeb
    • Writing text reports with RestructuredText
    • Importing relational data into a CubicWeb instance
    • Create a Website from scratch with CubicWeb
      • Getting started
      • Enhance views
      • Data management with CubicWeb

⚙ Setup and Usage

  • Setup and Administration
    • 1. Install a CubicWeb environment
    • 2. Configure a CubicWeb environment
    • 3. Deploy a CubicWeb application
    • 4. cubicweb-ctl tool
    • 5. Creation of your first instance
    • 6. Configure an instance
    • 7. User interface for web site configuration
    • 8. Multiple sources of data
    • 9. LDAP integration
    • 10. RQL logs
  • Backend Development
    • 1. Cubes
      • 1.1. What is a Cube?
      • 1.2. Standard structure for a cube
      • 1.4. Creating a new cube from scratch
      • 1.5. Available cubes
    • 2. The Registry, selectors and application objects
    • 3. Data model
      • 3.1. Yams schema
      • 3.4. Metadata
      • 3.5. Pre-defined entities in the library
      • 3.6. Defining a Workflow
    • 4. Data as objects
      • 4.1. Access to persistent data
      • 4.5. Loaded attributes and default sorting management
      • 4.6. Interfaces and Adapters
      • 4.7. How to use entities objects and adapters
    • 5. Core APIs
      • 5.1. Request and ResultSet methods
    • 6. Repository customization
      • 6.1. Sessions
      • 6.3. Hooks and Operations
      • 6.4. Notifications management
      • 6.5. Tasks
    • 7. Tests
    • 8. Migration
    • 9. Profiling and performance
    • 10. Full Text Indexing in CubicWeb
    • 11. Data Import
    • 12. Debug Channels
    • 14. Source connections pooler
  • Web Frontend Development
    • Publisher
    • Controllers
    • The Request class ( cubicweb.web.request )
    • RQL search bar
    • The View system
      • Principles
      • Templates
      • The Primary View
      • The “Click and Edit” (also reledit ) View
      • Base views
      • Startup views
      • Boxes
      • Table views
      • XML and RSS views
      • URL publishing
      • Breadcrumbs
      • The ‘download’ views
      • Online documentation system
    • Configuring the user interface
    • Ajax
    • Javascript
    • CSS Stylesheet
    • Edition control
      • HTML form construction
      • Dissection of an entity form
      • The edit controller
      • Examples
    • The facets system
    • Internationalization
    • The property mecanism
    • HTTP cache management
    • Locate resources
  • Pyramid
    • Quick start
    • The ‘pyramid’ command
    • Settings
    • Authentication
    • The pyramid debug toolbar
  • Additional Services
    • Undoing changes in CubicWeb

➕ More

  • Appendixes
    • 1. Frequently Asked Questions (FAQ)
    • 2. Relation Query Language (RQL)
      • 2.1. Introduction
      • 2.2. RQL syntax
      • 2.3. Debugging RQL
      • 2.4. RQL usecases
      • 2.5. Implementation
    • 3. Introducing Mercurial
    • 4. Installation dependencies
    • 5. Javascript docstrings
  • Changelog
  • API
    • cubicweb
    • cubicweb.appobject
    • cubicweb.cwvreg
    • cubicweb.dataimport
    • cubicweb.predicates
    • cubicweb.pyramid
      • cubicweb.pyramid.auth
      • cubicweb.pyramid.bwcompat
      • cubicweb.pyramid.core
      • cubicweb.pyramid.defaults
      • cubicweb.pyramid.login
      • cubicweb.pyramid.profile
      • cubicweb.pyramid.session
      • cubicweb.pyramid.url_redirection
    • cubicweb.req
    • cubicweb.rset
    • cubicweb.web.views.urlpublishing
    • cubicweb.web.views.urlrewrite
    • cubicweb.web
Theme by the Executable Book Project
  • .rst
Contents
  • Display
  • Building breadcrumbs

Breadcrumbs

Contents

  • Display
  • Building breadcrumbs

Breadcrumbs#

Breadcrumbs are a navigation component to help the user locate himself along a path of entities.

Display#

Breadcrumbs are displayed by default in the header section (see Layout and sections). With the default main template, the header section is composed by the logo, the application name, breadcrumbs and, at the most right, the login box. Breadcrumbs are displayed just next to the application name, thus they begin with a separator.

Here is the header section of the CubicWeb’s forge:

../../../../_images/breadcrumbs_header.png

There are three breadcrumbs components defined in cubicweb.web.views.ibreadcrumbs:

  • BreadCrumbEntityVComponent: displayed for a result set with one line if the entity is adaptable to IBreadCrumbsAdapter.

  • BreadCrumbETypeVComponent: displayed for a result set with more than one line, but with all entities of the same type which can adapt to IBreadCrumbsAdapter.

  • BreadCrumbAnyRSetVComponent: displayed for any other result set.

Building breadcrumbs#

The IBreadCrumbsAdapter adapter is defined in the cubicweb.web.views.ibreadcrumbs module. It specifies that an entity which implements this interface must have a breadcrumbs and a parent_entity method. A default implementation for each is provided. This implementation expoits the ITreeAdapter.

Note

Redefining the breadcrumbs is the hammer way to do it. Another way is to define an ITreeAdapter adapter on an entity type. If available, it will be used to compute breadcrumbs.

Here is the API of the IBreadCrumbsAdapter class:

If the breadcrumbs method return a list of entities, the cubicweb.web.views.ibreadcrumbs.BreadCrumbView is used to display the elements.

By default, for any entity, if recurs=True, breadcrumbs method returns a list of entities, else a list of a simple string.

In order to see a hierarchical breadcrumbs, entities must have a parent method which returns the parent entity. By default this method doesn’t exist on entity, given that it can not be guessed.

previous

URL publishing

next

The ‘download’ views

© Copyright 2001-2020, Logilab.
Last updated on Mar 30, 2023.