From e4b60c6d8a672fc2f59dd599cd347f3d25962def Mon Sep 17 00:00:00 2001 From: Chris Smith Date: Sat, 25 Jul 2009 10:23:05 +0000 Subject: [PATCH] Add some docs for dynamic includes adding in r9570 git-svn-id: file:///svn/phpbb/branches/phpBB-3_0_0@9848 89ea8834-ac86-4346-8a33-228a782c2dd0 --- phpBB/docs/coding-guidelines.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/phpBB/docs/coding-guidelines.html b/phpBB/docs/coding-guidelines.html index 32312054d9..37bad06587 100644 --- a/phpBB/docs/coding-guidelines.html +++ b/phpBB/docs/coding-guidelines.html @@ -1116,6 +1116,16 @@ append_sid("{$phpbb_root_path}memberlist.$phpEx", 'mode=group&

You will note in the 3.0 templates the major sources start with <!-- INCLUDE overall_header.html --> or <!-- INCLUDE simple_header.html -->, etc. In 2.0.x control of "which" header to use was defined entirely within the code. In 3.0.x the template designer can output what they like. Note that you can introduce new templates (i.e. other than those in the default set) using this system and include them as you wish ... perhaps useful for a common "menu" bar or some such. No need to modify loads of files as with 2.0.x.

+

Added in 3.0.6 is the ability to include a file using a template variable to specify the file, this functionality only works for root variables (i.e. not block variables).

+
+<!-- INCLUDE {FILE_VAR} -->
+
+

Template defined variables can also be utilised. +

+<!-- DEFINE $SOME_VAR = 'my_file.html' -->
+<!-- INCLUDE {$SOME_VAR} -->	
+
+

PHP

A contentious decision has seen the ability to include PHP within the template introduced. This is achieved by enclosing the PHP within relevant tags: