Construction
Content Elements Directory:
Content elements are stored in the following directory:
private/packages/content-system/src/components
Structure of a Content Element:
A content element follows the directory structure outlined below:
+ mycollection_NewContentElement
├── assets
│ ├── icon.svg // Icon representing the content element
│ ├── index.ts // Entry point for asset exports
│ └── style.scss // SCSS file for styling the content element
├── config.json // Configuration file for the content element
└── dist
├── TestComponent.js // Compiled JavaScript file for the component
└── TestComponent.min.css // Minified CSS file for production use
Explanation of Folders and Files:
assets/: Contains all static resources for the content element, such as icons, TypeScript entry points, and SCSS styles.config.json: Defines the configuration for the content element (e.g., metadata, settings, and options).dist/: Holds the compiled and production-ready files, including JavaScript and minified CSS.
tip
Naming Convention for Content Element Folders:
Each content element folder should be named using the following pattern:
collection_name
This ensures consistency and clarity across the project.