Changes between Version 26 and Version 27 of Howto/Templates/WorkingWithTemplates

Show
Ignore:
Author:
demian (IP: 81.1.80.118)
Timestamp:
04/21/08 05:25:00 (5 years ago)
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Howto/Templates/WorkingWithTemplates

    v1 v27  
    103103== Theme Inheritance == 
    104104It's important to mention that Flexy allows your themes to observe an inheritance model, in other words, if you only want to change the headers and footers, just define those templates in your new theme, and they will override the ones set in 'default'.  Because none of the other templates are present in your theme, the ones from 'default' will be used. 
     105 
     106The following code in !FlexyStrategy.php shows the theme inheritance rules for Flexy templates, the first element in the list has the highest precedence: 
     107 
     108{{{ 
     109$options = array( 
     110                       // the current module's templates dir from the custom theme 
     111'templateDir'       => SGL_THEME_DIR . '/' . $data->theme . '/' . $data->moduleName . PATH_SEPARATOR . 
     112 
     113                       // the default template dir from the custom theme 
     114                       SGL_THEME_DIR . '/' . $data->theme . '/default'. PATH_SEPARATOR . 
     115 
     116                       // the current module's templates dir from the default theme 
     117                       SGL_MOD_DIR . '/'. $data->moduleName . '/templates' . PATH_SEPARATOR . 
     118 
     119                       // the default template dir from the default theme 
     120                       SGL_MOD_DIR . '/default/templates', 
     121}}} 
     122 
    105123 
    106124== Setting the theme on a per-manager basis ==