Template System Documentation
The serB2B template system is built on the Twig template engine. This section contains all the information you need to work with the template system.
🚀 Quick Start
You can follow the steps below to get started with the template system:
1️⃣ Twig Basics
Learn the fundamental structure and syntax of the Twig template engine.
➡️ Twig Basics
- What is Twig and how does it work?
- Basic syntax and operators
- Variables, filters, and control structures
- Include and extend systems
2️⃣ serB2B Custom Functions
Discover functions, filters, and global variables added specifically for serB2B.
- Global variables (user, site, e-commerce)
- Custom functions (config, render, webpack, etc.)
- Custom filters (translation, URL, price format, etc.)
- Practical usage examples
3️⃣ Template Files Reference
Explore detailed descriptions and usage examples of existing template files.
➡️ Template View Files Reference
- List and descriptions of all view files
- Header variants and their features
- Widget system and usage
- Product, customer, and order templates
🛠️ Development Tips
-
Start with the Basic Theme
- Serves as the foundation for all new themes
- Well-structured and documented
-
Use Widgets
- Avoid code repetition
- Work with a modular structure
-
Enable Debug Mode
- Inspect variables with
{{ dump(variable) }} - Identify errors easily
- Inspect variables with
-
Don't Forget the Cache
- Clear the cache for template changes to appear
- Disable the cache in the development environment
-
Prioritize Security
- Use the
rawfilter with caution - Always filter user inputs
- Use the
📚 Additional Resources
Related Documentation
- Product Data Fields - All available fields in the product object
- Category Data Fields - Category object properties
- Group Data Fields - Group object properties
- Brand Data Fields - Brand object properties
External Resources
🤝 Support
For questions about the template system:
- Contact the technical support team
- Search the documentation
- Review example templates
This documentation provides all the information you need to work efficiently with the serB2B template system. Follow the links above for detailed information.