Here are a few examples of how different components can be implemented in Drupal 7.
- Panels layout
- Panels style
- Ctools content type
- Theme function override
- Template override
- Twig file with slate module
- View mode override with slate module
- Views style plugin
Note: These examples requires the Kostym module to work and assumes that the Kostym gulpfile is used.
Component: TwoColumns
For a panels layout to get auto-detected by the Kostym module, you just place it under a subfolder called panels-layouts.
kostym_components
└── TwoColumns
├── TwoColumns.js
├── _TwoColumns.scss
└── panels-layouts
├── TwoColumns.admin.css
├── TwoColumns.inc
├── TwoColumns.png
└── two-columns.tpl.php
Component: Box
For a panels style to get auto-detected by the Kostym module, you just place it under a subfolder called panels-styles.
kostym_components
└── Box
├── _Box.scss
└── panels-styles
├── Box.inc
└── box.tpl.php
Component: Logo
For a ctools content type to get auto-detected by the Kostym module, you just place it under a subfolder called ctools-content_types.
kostym_components
└── Logo
├── _Logo.scsssubfolder
└── ctools-content_types
└── Logo.inc
Component: StatusMessages
Note: Right now there is no support for theme function with suggestions.
kostym_components
└── StatusMessages
├── StatusMessages.info
├── StatusMessages.module
└── _StatusMessages.scss
Component: Page
Read more about template overrides and suggestions.
kostym_components
└── Page
├── node--page.tpl.php
└── _Page.scss
Component: Video
This component is dependent on the slate module.
kostym_components
└── Video
├── Video.html.twig
└── _Video.scss
Component: ArticleTeaser
This component is dependent on the slate module.
kostym_components
└── ArticleTeaser
├── ArticleTeaser.html.twig
└── _ArticleTeaser.scss
Component: CompactList
kostym_components └── CompactList ├── CompactList.info ├── CompactList.module ├── CompactList.tpl.php ├── CompactList.views.inc └── _CompactList.scss