docs
docs copied to clipboard
[Roadmap] Improve Themes section
Getting started
- [ ] Guidelines and coding standards 🟠
- [ ] Setting up your local environment 🟠
- [ ] Required tools ➡️ generic, should go somewhere else
- [x] Theme organization ✅
- [ ] Theme.yml 🟠
- [ ] Asset Management 🟠
- [ ] Webpack 🟠
Reference
- [ ] Theme Hooks 🟠
- [ ] Javascript Events 🟠
- [ ] Migrating from PrestaShop 1.6 ➡️ must become "Migrating from PrestaShop 1.7 to 8"
- [ ] Overriding modules 🟠
- [ ] Overriding selectors 🟠
- [ ] RTL support 🟠
- [x] Template inheritance ✅
- [ ] Parent/child theme 🟠
- [ ] Templates 🟠
- [ ] Template hierarchy 🔴
- [x] Theme translation ✅
- [x] Theme-specific modules ✅
- [ ] Distribution ➡️ must be removed
Other
- [ ] Mobile guide 🔴 see https://www.drupal.org/docs/mobile-drupal-sites
➡️= must move or must be removed ✅ = quite complete (although can always be improved) 🟠 = can be improved 🔴 = does not exist
Some very good notes from @kpodemski :
Getting started
Setting up your local environment
- probably needs to show how to use stable release too, the link between this page and page about the branches/installation of PrestaShop
- show alternatives to Classic
- there's no theme.dist.yml
the entire process should be performed by the developer and updated accordingly
Required tools
This section is valid for the entire project in many places. We probably need to move it to a better place but leave it here with the URLs.
Theme.yml
Theme configuration?
Lack of info that PrestaShop is keeping .yml files in the cache "config/themes/theme_name". Sometimes it might be confusing when you change the theme.yml, reset it, and nothing happens.
For the new theme we will need, a dedicated flag.
Asset management
Confusing structure. There's the part about adding assets through modules. Maybe it should be moved and only linked from here. Webpack page is outdated.
Some very good notes from @kpodemski :
Reference
Theme Hooks
Examples with registering our hooks are invalid. {hook} has optional parameters available.
Javascript Events
List of events to be checked
Overriding modules
We can also override email templates. There's no info about that.
Overriding selectors
Missing example
Templates
There's a lack of details, especially related to assets loading and operating on the variables from the FrontController. https://github.com/PrestaShop/PrestaShop/pull/25668
Template hierarchy
The docs are here https://devdocs.prestashop.com/1.7/themes/reference/templates/templates-layouts/#specific-templates
But it's called "template hierarchy" in the WordPress world, and I'm sure some will look for this using this phrase.