Themes 2.x
This is a theme engine for Craft CMS, it allows you to create themes that are reusable and extendable. Themes are regular plugins, as such they can have their own settings, migrations etc, but now have a set of templates and assets that will inherit themselves, allowing for faster front-end development.
Craft
backend is amazing but if you're not a developer making a frontend can
be a bit daunting and if you're making a lot of sites can become a
repeating exercise, this plugin (especially in pro version) should alleviate this by doing a lot of the work for you.
This theme engine will allow you to :
- Install themes from the store or any git repository (composer, github, local filesystem etc)
- Define your own themes that can extend each other
- Choose which theme will be used for which site, language, viewport or url path according to a set of rules.
Breaking changes
Themes are now regular plugins, they will not be installed in the themes
folder anymore.
- composer.json type must be
craft-plugin
- Main class must inherit
Ryssbowh\CraftThemes\ThemePlugin
- Main class method
getName()
has been removed - Main class method
getHandle()
has been removed - Main class method
getPath()
has been replaced bygetBasePath()
- Main class method
getTemplatePath()
replaced bygetTemplatesFolder()
- Main class parameter
extends
replaced by methodgetExtends()
Installation
run composer require ryssbowh/craft-themes:^2.0
Add a rule in the settings to load a theme or set a default theme.
Requirements
Craft 3.5 or over