Loading...

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

 

Did not find what you were looking for?

If this content did not answer your questions, try searching or contacting our support team for further assistance.

Back to Section navigation