Child pages
  • Don't add templates without meta comments to structure [5.3.0-B1]
Skip to end of metadata
Go to start of metadata

By default a category in "Website & Content > Structure & Data" section of Admin Console is created for every template present in theme. This is done to:

  • allow adding link to that template in top menu
  • specifying nice name for that template in menu (nice name: "My Template", template filename: "my_template.tpl")

Each template can have optional HTML comment on top to specify properties of created category:

<NAME>Billing step</NAME>
<DESC>Billing step where user enters the payment inforamtion</DESC>

Unfortunately, when this optional comment is missing the created category name would look like "_Auto: my_template.tpl" (my_template.tpl is name of scanned template). These "_Auto: ..." templates have 2 problems:

  • name is ugly
  • indicates, that developer forgot to add proper HTML comment on top of template


Even though this change is clearly a BC break I propose:

  1. Not to create category for templates, that are missing HTML comment. This would also save time for creating ".smsignore" files mentioning these templates, because usually templates in the ".smsignore" files don't have HTML comment on top of them anyway.
  2. To ease developer life after theme rescan, initiated from "System Tools" section is completed we can show "Categories for N templates where not created due missing HTML comment" message, where N would be total number templates from ThemeFiles table, that have no HTML comment (we're already tracking that).

Related Tasks