Security News
JSR Working Group Kicks Off with Ambitious Roadmap and Plans for Open Governance
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
druxt-views
Advanced tools
Drupal Views components for Druxt with support for filters, pagination and sorting.
Drupal Views components for Druxt with support for filters, pagination and sorting.
$ npm install druxt-views
Add module to nuxt.config.js
module.exports = {
modules: [
'druxt-views'
],
druxt: {
baseUrl: 'https://demo-api.druxtjs.org',
views: {
bundleFilter: true,
fields: ['title'],
},
},
}
The DruxtView component uses the JSON:API Views module to render a Decoupled Drupal View.
<DruxtView view-id="frontpage" />
The View can be themed by providing a default scoped slot:
<DruxtView view-id="frontpage">
<template #default="{ results }">
{{ results }}
</template>
</DruxtView>
The component also provides a DruxtWrapper component for theming:
<template>
<div>
<slot name="sorts" />
<slot name="results" />
<slot name="pager" />
<div>
</template>
See the DruxtViews API documentation for more information.
These options are specific to this module.
Option | Type | Required | Default | Description |
---|---|---|---|---|
views.query.bundleFilter | boolean | No | false | Whether to automatically detect Resource types to filter, based on the View bundle filter. |
views.query.fields | string[] | No | [] | An array of fields to filter from the JSON:API Views Resource types. |
views.query.resourceTypes | string[] | No | [] | An array of Resource types to be used by the Fields filter. |
These options are available to all Druxt modules.
Option | Type | Required | Default | Description |
---|---|---|---|---|
axios | object | No | {} | Axios instance settings. |
baseUrl | string | Yes | null | Base URL for the Drupal installation. |
FAQs
Drupal Views components for Druxt with support for filters, pagination and sorting.
We found that druxt-views demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
At its inaugural meeting, the JSR Working Group outlined plans for an open governance model and a roadmap to enhance JavaScript package management.
Security News
Research
An advanced npm supply chain attack is leveraging Ethereum smart contracts for decentralized, persistent malware control, evading traditional defenses.
Security News
Research
Attackers are impersonating Sindre Sorhus on npm with a fake 'chalk-node' package containing a malicious backdoor to compromise developers' projects.