Version:

    Custom component definition file

    Each custom component definition file must have the following properties:

    Each custom component definition file can also have the following, optional, properties:

    Example structure 1:

    name: Custom component JS with template
    category: cpt_cat_hero_components
    js:
      js-template.js: {}
      https://cdn.jsdelivr.net/npm/[email protected]/slick/slick.min.js: { type: external, minified: true, attributes: { defer: true, async: true } }
    css:
      js-template.css: {}
    form: form.json
    html: html-template.html
    preview_image: preview.png


    Example structure 2:

    name: Twig custom component
    category: cpt_cat_example
    template: template.html.twig
    availability:
      -
        type: node
        bundles:
          - article
          - layout_page
    form: form.json
    css:
      twig-component.css: {}
    preview_image: preview.png

     

    DX8 knowledge base icon

    Frequently asked questions

    Get instant answers to common questions. Available online 24/7.

    Find answers

    Raise a ticket icon

    Raise a support ticket

    To raise a ticket, sign into Acquia Cloud and select Help in the top menu.

    Raise support ticket

    Acquia

    Copyright © 2020 Acquia, Inc. All Rights Reserved. Drupal is a registered trademark of Dries Buytaert.