Template-before-Core (TbC):

The phpTank CMS have a loading hierarchy or loading priority if you will, that allow templates to use their own version of a module or page that will override the same item if it is also located in the Core.

This have many implications for you as the developer, as well as for you as the user.

To mention a couple things:

  • You can modify a module for only a single template, while leaving the original module intact for all the other templates.

    You achieve this by copying the entire module folder from modules/_moduleName_ and paste it into templates/_templateName_/modules/_moduleName_.

    Once you have done this you can start to make changes to the module located in templates/_templateName_/modules/_moduleName_ and it will be used by only this tempalte.

  • The same goes for pages.

    You can even take a SINGLE page from any modules/_moduleName_/pages/ folder and copy 'n' paste that file alone into a templates/_templateName_/modules/_moduleName_/pages/ folder.

    You can now make changes to only this file, and even if it is outside the module folder it originally belong to, it will still work as intended.

This functionality grant you enormous freedom when customizing modules and templates to your needs and spesifications. You can litterarily have dozens of almost identical templates and pages without any extra overhead on loading.

If a module is located in both the Core and a template, the module will be ignored from the Core and loaded from the Template.

If it is only present in one of those locations, that one is loaded.

For pages the loading structure is like this: Core Module -> Template Module -> Template Pages, with template pages having the higest priority.