We've added a variable 'cheat sheet' for every HTML file.
Whenever HTML files are open within the theme editor, a new button is now available on the toolbar with the label 'variables'. If you click this button, you'll be shown the cheat sheet, which you can see above.
The cheat sheet is split into three main parts:
- Unique variables - Variables unique to the file currently being modified in the theme editor.
- Global variables - Variables shared by every HTML file within your Easy Eatery theme.
- Attributes - These are modifiers for variables that change the output of the variable when used.
We've added a date-time format attribute.
In addition to the attributes we discussed in our previous development update, we've added a new attribute for date variables in January.
For any template variables representing dates (such as blog post publish dates), it's possible to use the DateTime formatting parameter to control how the dates are formatted when rendered.
We've decided to follow PHP's DateTime formatting practices for easy adoption.
For example, {@post.date [dt-format:F jS Y] }, would be output as January 22nd 2023.
This parameter can also be used with the tag flag, CSS class, and ID parameters.