Security News
Cloudflare Adds Security.txt Setup Wizard
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
druxt-entity
Advanced tools
Drupal Display Mode powered Entity, Form and Field Druxt components.
$ npm install druxt-entity
Add module to nuxt.config.js
module.exports = {
modules: ['druxt-entity'],
druxt: {
baseUrl: 'https://demo-api.druxtjs.org',
entity: {
component: {
fields: false,
},
query: {
schema: true,
fields: ['path', 'title'],
},
},
},
}
The DruxtEntity component renders content entities using Drupal's View display modes.
<DruxtEntity :type="resourceType" :uuid="uuid" :mode="displayMode" />
See the DruxtEntity API Documentation for more information.
The DruxtEntityForm component uses Drupal's Form displays modes for content creation and editing.
<DruxtEntityForm :type="resourceType" :mode="displayMode" />
See the DruxtEntityForm API Documentation for more information.
Both components can be themed by providing a default template:
<DruxtEntity type="node--page" :uuid="uuid">
<template #default="{ entity, fields, schema }">
{{ entity }}
</template>
</DruxtEntity>
The module also provides Wrapper components with scoped slots for theming:
<template>
<div>
<h1>{{ $attrs.entity.attributes.title }}</h1>
<slot name="body" />
<div>
</template>
See the Druxt Theming guide for more information.
These options are specific to this module.
Option | Type | Required | Default | Description |
---|---|---|---|---|
entity.components.fields | boolean | No | true | Whether to import deprecated default Field components. |
entity.query.fields | string[] | No | [] | An array of fields to filter all Entity JSON:API queries. |
entity.query.schema | boolean | No | false | Whether to automatically filter fields based on Display schema. |
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 Display Mode powered Entity, Form and Field Druxt components.
The npm package druxt-entity receives a total of 146 weekly downloads. As such, druxt-entity popularity was classified as not popular.
We found that druxt-entity 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
Cloudflare has launched a setup wizard allowing users to easily create and manage a security.txt file for vulnerability disclosure on their websites.
Security News
The Socket Research team breaks down a malicious npm package targeting the legitimate DOMPurify library. It uses obfuscated code to hide that it is exfiltrating browser and crypto wallet data.
Security News
ENISA’s 2024 report highlights the EU’s top cybersecurity threats, including rising DDoS attacks, ransomware, supply chain vulnerabilities, and weaponized AI.