From 68336ab137432ecf9322474a7853d5d16e660fb2 Mon Sep 17 00:00:00 2001 From: Vjacheslav Trushkin Date: Wed, 14 Mar 2012 23:25:07 +0200 Subject: [PATCH] [feature/merging-style-components] Updating coding guidelines Updating template inheritance section in coding guidelines PHPBB3-10632 --- phpBB/docs/coding-guidelines.html | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 55fbf6d4e8..e85be02d45 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -71,7 +71,7 @@
  • Templating
    1. General Templating
    2. -
    3. Template Inheritance
    4. +
    5. Styles Tree
  • Character Sets and Encodings
  • Translation (i18n/L10n) Guidelines @@ -1623,24 +1623,25 @@ div </form>
    -

    4.ii. Template Inheritance

    -

    When basing a new style on an existing one, it is not necessary to provide all the template files. By declaring the base style name in the inherit_from field in the template configuration file, the style can be set to inherit template files from the base style. The limitation on this is that the base style has to be installed and complete, meaning that it is not itself inheriting.

    +

    4.ii. Styles Tree

    +

    When basing a new style on an existing one, it is not necessary to provide all the template files. By declaring the base style name in the parent field in the style configuration file, the style can be set to reuse template files from the parent style.

    -

    The effect of doing so is that the template engine will use the template files in the new style where they exist, but fall back to files in the base style otherwise. Declaring a style to inherit from another also causes it to use some of the configuration settings of the base style, notably database storage.

    +

    The effect of doing so is that the template engine will use the template files in the new style where they exist, but fall back to files in the parent style otherwise.

    -

    We strongly encourage the use of inheritance for styles based on the bundled styles, as it will ease the update procedure.

    +

    We strongly encourage the use of parent styles for styles based on the bundled styles, as it will ease the update procedure.

    -        # General Information about this template
    -        name = inherits
    -        copyright = © phpBB Group, 2007
    -        version = 3.0.3
    +# General Information about this style
    +name = Custom Style
    +copyright = &copy; phpBB Group, 2007
    +version = 3.1.0
     
    -        # Defining a different template bitfield
    -        template_bitfield = lNg=
    +# Defining a different template bitfield
    +# template_bitfield = lNg=
     
    -        # Are we inheriting?
    -        inherit_from = prosilver
    +# Parent style
    +# Set value to empty or to this style's name if this style does not have a parent style
    +parent = prosilver