Task: Add weight
and breadcrumbs
attributes to node pages.
Using the json api for "Jobs at the Library" Drupal node page as the example. For full: https://dev.lib.umich.edu/web/jsonapi/node/page/68bd39d6-5546-4789-9b3c-0724782b2508
Breadcrumb specs:
- Start at the homepage.
- Attach property of
breadcrumbs
with an array of objects as the value. - Each object in the array contains
text
andto
.text
is the page title.to
is the alias to that page.
Weight specs:
- The
weight
of the page corresponding to the order set by Drupal content administrators.
attributes: {
...
breadcrumbs: [
{ text: 'Home', to: '/' },
{ text: 'About Us', to: '/about-us' },
{ text: 'Jobs at the Library', to: '/about-us/jobs-at-library' }
],
weight: 3
}