Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Storefront Templates as Extensions

Storefront Templates

AbanteCart storefront templates are set per store and consist of number of files. Storefront default template is located in /storefront/view/default/ directory that includes all other components for the template.
Template is constructed based on the page layout and blocks. With template CSS and JavaScript pages, layouts and blocks can be set to display desired style. Most of layout settings are stored and managed in the database with great flexibility.
Most important components of AbanteCart templates aside of images, CSS and JavaScripts are .tpl files. These .tpl files respect PHP syntax, and rendered by AView class. When rendered AView class populate template with template variables’ values generated by controller as part of MVC approach.
These template files are located in /storefront/view/default/template directory

It is recommended that all new templates to AbanteCart developed and added as extensions. This will allow seamless upgrade to future versions of abantecart.

When develop template as extension you simply override any existing default template files in extension or add new once.


Blocks and layout

AbanteCart offers a lot of flexibility to develop different layouts for pages with set collection of blocks assigned per layout per page. Important to note that layout system is only used in pages for storefront. Responses and Control Panel pages do not utilize layout system. Each layout is linked to one template and one or multiple pages. Default layout is loaded if no other layout is found linked to given page.
Below diagrams demonstrate how page, layout and blocks are related to each other:

  • No labels