Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Well that was simple.  Easy as 1-2-3.  End of tutorial.  

But wait, there is more!

File System

Within the file system system there are two places that the system will look.  The first place the system looks is under the theme directly.  So assuming that our active theme directory is /themes/MrTeas, then the system is actually checking first to see if the file /themes/MrTeas/products/test.html exists.  If it does, then that is the file that is served up to the end user.  

...

Why does the theme directly get checked first?  So that templates can handle paths properly for assets, images, favicon, etc. and tolerate the name changes in the theme directory as they are cloned and upgraded.

Item Page

For an item, StoreFronts separates the path into /products/ and test.html, strips off the extension, and then looks to see if there is a page with the path /products/ containing an item with the item id of test assigned to it.  If so, then the item page is served up to the customer.

Group Page

Finally we check to see if the path represents a group page.  So the system will treat /products/test.html and /products/test/ the same.  The difference is that the StoreFront system knows to automatically render test.html as the end of the path whenever there are no additional child pages or items assigned to the group.

...