https://github.com/zaengle/craft-conventions
Opinionated conventions for organising CraftCMS templates
https://github.com/zaengle/craft-conventions
craft craft-plugin craft4 craft5 craftcms craftcms-plugin
Last synced: 3 months ago
JSON representation
Opinionated conventions for organising CraftCMS templates
- Host: GitHub
- URL: https://github.com/zaengle/craft-conventions
- Owner: zaengle
- License: mit
- Created: 2022-05-30T07:59:35.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-27T11:40:28.000Z (9 months ago)
- Last Synced: 2025-04-12T04:13:20.780Z (6 months ago)
- Topics: craft, craft-plugin, craft4, craft5, craftcms, craftcms-plugin
- Language: PHP
- Homepage: https://craft-conventions.zaengle.com/
- Size: 2.43 MB
- Stars: 8
- Watchers: 3
- Forks: 0
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Conventions plugin for Craft CMS 4.x
[](https://packagist.org/packages/zaengle/craft-conventions) [](https://plant.treeware.earth/zaengle/craft-toolbelt) [](https://packagist.org/packages/zaengle/craft-conventions)
The Conventions plugin helps you maintain a consistent template structure both within and across your Craft CMS projects, by making it easy to define and use twig helper functions that act as improved replacements for Twig's native `{% include %}` tag. These functions are designed to help you write cleaner, more consistent templates with less boilerplate.
Turn this:
```twig
{% include('_components/blog/card') with { data: myData } only %}
```
Into this:```twig
{{ component('card/blog', { data: myData }) }}
```with just a single line definition in a config file.
## Features
- Works out-of-the-box with default options
- Flexible config options
- Easily customisable for advanced use-cases## How to use
[Read the documentation](https://craft-conventions.zaengle.com/)
## Security Vulnerabilities
Please review [our security policy](./.github/SECURITY.md) on how to report security vulnerabilities.
## Conventions Roadmap
- [ ] Tests!
- [ ] Add generators for scaffolding new patterns
- [ ] Styleguide generator intergration 🧐Brought to you by [Zaengle Corp](https://zaengle.com/)