Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/www/domains/hppgallery_com/design/defaulttheme/tpl/pagelayouts/main.php on line 59

Warning: date(): It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in /home/www/domains/hppgallery_com/design/defaulttheme/tpl/pagelayouts/main.php on line 59
Wednesday, June 28, 2017
 

Explains how to create custom template without changing core templates.

Small tutorial witch explains how custom templates is created.

Settings explain

If you open settings.ini.php file located in settings folder you will see similar lines:

  'eng' => 
  array (
    'locale' => 'en_EN',
    'theme' => 
    array (
      0 => 'frontend',
      1 => 'defaulttheme',
    ),
  ),

There are two main options.

  • frontend
  • defaulttheme

Then system request's some template it first searches it in "/design/frontend" and then in "/design/defaulttheme" folders. You can have as many as you want themes overrides in single siteaccess. Shop enabled siteaccess usualy looks like.

  'eng' => 
  array (
    'locale' => 'en_EN',
    'theme' => 
    array (
      0 => 'frontend',
      1 => 'shoptheme',
      2 => 'defaulttheme',
    ),
  ),

In order to see witch templates was used you can enable debug output. In order to enable debug output you have to set "debug_output" to true. Like in example below.

'debug_output' => true,

Now just if you want to create template override you can create template with the same path and name and system will automatic load you template. That way you can create custom templates without changing original templates. Need to notice that if you override CSS files you have to copy images, because in CSS described images is located relatively to CSS location, easiest way is just copy images from default theme to your template folder. This is how template override system works.

Back »

Comments: 0

Leave a reply »

 
  • Leave a Reply
    Your gravatar
    Your Name
     
     
     
     
 
About HPPG

High performance photo gallery dedicated for large numbers of image storage.

Get in touch

Donate



Download