Main driver file for extension

This is a main file that gets processed every time extension is loaded. It is used to include files used by given extension, define extension resources and do other initial routines.
There are 4 types of resources that extension can use

  • controllers
  • languages
  • models
  • template files

Each resource can be in 2 sections โ€“ admin & storefront.

Controllers, languages and models defined asย catalog/product
Templates defined withย .tplย extension โ€“ย catalog/product.tpl

example
<?php
if ( !defined ( 'DIR_CORE' )) {
	header ( 'Location: static_pages/' );
}
include('core/template2.php');
include('core/template2_pagination.php');

$languages = array(
  	'storefront' => array(
	  'template2/template2',
  	),
  	'admin' => array(
	    	'template2/template2',
  	),
);
$templates = array(
  	'storefront' => array(
	  'common/head.tpl',
	  'common/header.tpl',
	  'common/footer.tpl',
  	),
  	'admin' => array(),
);
?>