/src/system/application/config/template.php

https://github.com/rickogden/joind.in · PHP · 84 lines · 24 code · 5 blank · 55 comment · 4 complexity · 25d2371514b6ed21311754fc082ddae6 MD5 · raw file

  1. <?php if (!defined('BASEPATH')) exit('No direct script access allowed');
  2. /*
  3. |--------------------------------------------------------------------------
  4. | Active template
  5. |--------------------------------------------------------------------------
  6. |
  7. | The $template['active_template'] setting lets you choose which template
  8. | group to make active. By default there is only one group (the
  9. | "default" group).
  10. |
  11. */
  12. $template['active_template'] = 'default';
  13. /*
  14. |--------------------------------------------------------------------------
  15. | Explaination of template group variables
  16. |--------------------------------------------------------------------------
  17. |
  18. | ['template'] The filename of your master template file in the Views folder.
  19. | Typically this file will contain a full XHTML skeleton that outputs your
  20. | full template or region per region. Include the file extension if other
  21. | than ".php"
  22. | ['regions'] Places within the template where your content may land.
  23. | You may also include default markup, wrappers and attributes here
  24. | (though not recommended). Region keys must be translatable into variables
  25. | (no spaces or dashes, etc)
  26. | ['parser'] The parser class/library to use for the parse_view() method
  27. | NOTE: See http://codeigniter.com/forums/viewthread/60050/P0/ for a good
  28. | Smarty Parser that works perfectly with Template
  29. | ['parse_template'] FALSE (default) to treat master template as a View. TRUE
  30. | to user parser (see above) on the master template
  31. |
  32. | Region information can be extended by setting the following variables:
  33. | ['content'] Must be an array! Use to set default region content
  34. | ['name'] A string to identify the region beyond what it is defined by its key.
  35. | ['wrapper'] An HTML element to wrap the region contents in. (We
  36. | recommend doing this in your template file.)
  37. | ['attributes'] Multidimensional array defining HTML attributes of the
  38. | wrapper. (We recommend doing this in your template file.)
  39. |
  40. | Example:
  41. | $template['default']['regions'] = array(
  42. | 'header' => array(
  43. | 'content' => array('<h1>Welcome</h1>','<p>Hello World</p>'),
  44. | 'name' => 'Page Header',
  45. | 'wrapper' => '<div>',
  46. | 'attributes' => array('id' => 'header', 'class' => 'clearfix')
  47. | )
  48. | );
  49. |
  50. */
  51. /*
  52. |--------------------------------------------------------------------------
  53. | Default Template Configuration (adjust this or create your own)
  54. |--------------------------------------------------------------------------
  55. */
  56. $default_template='template2';
  57. if(function_exists('getenv') && $key=strtolower(getenv('USE_KEY'))){
  58. $path=APPPATH.'views/custom_templates/'.$key.'/_template_'.$key.'.php';
  59. if(is_file($path)){
  60. $default_template='custom_templates/'.$key.'/_template_'.$key.'.php';
  61. }
  62. }
  63. $template['default']['template'] = $default_template;
  64. $template['default']['regions'] = array(
  65. 'header',
  66. 'css',
  67. 'content',
  68. 'footer',
  69. 'logged',
  70. 'feedurl',
  71. 'sidebar2',
  72. 'sidebar3',
  73. 'info_block'
  74. );
  75. $template['default']['parser'] = 'parser';
  76. $template['default']['parser_method'] = 'parse';
  77. $template['default']['parse_template'] = FALSE;
  78. /* End of file template.php */
  79. /* Location: ./system/application/config/template.php */