Changes between Version 6 and Version 7 of DolDesign
- Timestamp:
- Jan 28, 2011, 9:01:06 AM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
DolDesign
v6 v7 2 2 == '''''Custom template creation''''' == 3 3 4 Design templates in new Dolphin 7 are a little bit different from Dolphin 6. Now almost all content representation can be controlled by system templates and modules templates. See description of '''!BxDolTemplate''' class forcomplete list.4 Design templates in the new Dolphin 7 are a little bit different from Dolphin 6. Now almost all content representation can be controlled by system templates and modules templates. See the description of the '''!BxDolTemplate''' class for the complete list. 5 5 6 To start new templates, it is best to make it a copy of UNI template. UNI is empty template which inherit base template only. Base template is never used directly but all other templates must inherit it, and override only necessary features. After you make a copy ofUNI template, you can start to override its styles.6 To start new templates, it is best to make it a copy of the UNI template. UNI is empty template which inherits the base template only. The base template is never used directly, but all other templates must inherit it, and override only the necessary features. After you make a copy of the UNI template, you can start to override its styles. 7 7 8 For example you need to override body color in common.css file, then you need to add style for body color in your common.css file, which has only one line by default - inclusion of common.css file from base. It is strongly prohibited to copy CSS files from base, because it will make future versionsupgrades more difficult.8 For example, you need to override body color in the common.css file, then you need to add style for body color in your common.css file, which has only one line by default - inclusion of the common.css file from the base. It is strongly prohibited to copy the CSS files from the base, because it will make future version upgrades more difficult. 9 9 10 To override some html template just copy it from base, and make necessary changes. It is bad practice to copy all html templates frombase directory without modifying them.11 To override image, place it to your template with the same name, and your image will be used instead of default. To leave default image - do not copy it from base, it is already used frombase if not found in your template.10 To override some html template just copy it from the base, and make the necessary changes. It is bad practice to copy all html templates from the base directory without modifying them. 11 To override an image, place it on your template with the same name, and your image will be used instead of the default. To leave the default image - do not copy it from the base - it is already used from the base if not found in your template. 12 12 13 To override some PHP class , in very basic example, you need to copy the function from base class and place to yours to start making modifications in it. It is strongly prohibited to copy whole PHP class, or all functions frombase class. Such modifications make you more flexible in designing new templates, but it requires some basic knowledge of PHP.13 To override some PHP class (as a very basic example) you need to copy the function from the base class and place to yours to start making modifications in it. It is strongly prohibited to copy the whole PHP class, or all functions from the base class. Such modifications make you more flexible in designing new templates, but it requires some basic knowledge of PHP. 14 14 15 In most cases all you need is to override some CSS, html and PHP files, but in some rare cases you need to modify modules design too. In this case you need to follow the same rules but regarding to module templates directory, it also has ''css'', ''script'' directories like main site templates, and also all modules come withbase template.15 In most cases, all you need is to override some CSS, html and PHP files, but in some rare cases you need to modify modules design too. In this case you need to follow the same rules but regarding the module templates directory, it also has ''css'', ''script'' directories like main site templates, and also all modules come with the base template. 16 16 17 For more information about templates see '''!BxDolTemplate''' class.17 For more information about templates see the '''!BxDolTemplate''' class.