Modules

Router

Drupal router for Nuxt, powered by the Drupal Decoupled Router module.

Features

  • Vue.js components:
    • DruxtRouter: Renders a Druxt component for the resolved Decoupled route
  • Route providers:
    • Content entity routes resolve DruxtEntity components
    • Drupal Views page routes resolve DruxtView components

Installation

  1. Download the module:

    npm i druxt-router
    
  2. Add the module to nuxt.config.js:

    export default {
      modules: ['druxt-router/nuxt'],
    }
    

Options

  • druxt.router.pages

    Type: boolean
    Default: true if pages/ directory exists, else false

    Controls whether the Nuxt pages/ directory is used to generate routes.

  • druxt.router.wildcard

    Type: boolean
    Default: true

    Controls whether the wildcard route should be installed into the Nuxt/Vue router.


Vue.js components

DruxtRouter

Renders a Druxt module router component based on the resolved route provided by the Drupal Decoupled Router module.

<DruxtRouter />