Metatags & Local tasks

Lupus Decoupled Drupal integrates with the Drupal Metatags module and local tasks (Drupal tabs) and provides them as part of the API response.

The Nuxt CE connector has that functionality built-in, such that metatags, link relations and local tasks work out of the box.

Metatags

The frontend can access the metatags via the metatags property of the API response.

The metatags are grouped by their group name, e.g. meta or jsonld. Each group contains an array of metatags.

Example API output:

"metatags": {
  "meta": [
    {
      "name": "title",
      "content": "Lupus Decoupled Drupal"
    },
    {
      "name": "description",
      "content": "Lupus Decoupled Drupal"
    },
    {
      "property": "og:url",
      "content": "https://lupus-decoupled.org"
    },
  ],
  "link": [
    {
      "rel": "canonical",
      "href": "https://lupus-decoupled.org"
    }
  ]
},

The metatags can be configured by visiting:

Administration > Configuration > Search and metadata > Metatag

Schema.org via JSON-LD

The Schema.org structured data markup is supported via the Drupal extension module Schema Metatag. When installed, the structured data can be configured through the Metatag module's user interface. The data is output in the API response under the jsonld metatag group. On the frontend, the Nuxt Drupal-CE connector supports outputting JSON-LD and handles it automatically.

Local tasks

The frontend can access the local tasks via the local_tasks property of the API response.

The local tasks are grouped by their primary and secondary tabs.

Example API output:

"local_tasks": {
  "primary": [
    {
      "url": "/frontpage",
      "label": "View",
      "active": true
    },
    {
      "url": "/node/1/edit",
      "label": "Edit",
      "active": false
    },
    {
      "url": "/node/1/delete",
      "label": "Delete",
      "active": false
    },
    {
      "url": "/node/1/layout",
      "label": "Layout",
      "active": false
    },
    {
      "url": "/node/1/revisions",
      "label": "Revisions",
      "active": false
    },
    {
      "url": "/entity_clone/node/11",
      "label": "Clone",
      "active": false
    },
  ],
  "secondary": []
}