aboutsummaryrefslogtreecommitdiffstats
path: root/library/Smarty/INHERITANCE_RELEASE_NOTES.txt
diff options
context:
space:
mode:
authorMario Vavti <mario@mariovavti.com>2015-12-06 20:12:05 +0100
committerMario Vavti <mario@mariovavti.com>2015-12-06 20:12:05 +0100
commitc23ce16cafb826c8bb4fe7aaf2a5525b29052b23 (patch)
tree2230b03cfa6b74f3898b57bee647bc6276fd5a53 /library/Smarty/INHERITANCE_RELEASE_NOTES.txt
parent78a70fed2f7cf9a53e6e4fab516b00cece12fbf0 (diff)
downloadvolse-hubzilla-c23ce16cafb826c8bb4fe7aaf2a5525b29052b23.tar.gz
volse-hubzilla-c23ce16cafb826c8bb4fe7aaf2a5525b29052b23.tar.bz2
volse-hubzilla-c23ce16cafb826c8bb4fe7aaf2a5525b29052b23.zip
update smarty library - seems to bring some performance improvement
Diffstat (limited to 'library/Smarty/INHERITANCE_RELEASE_NOTES.txt')
-rw-r--r--library/Smarty/INHERITANCE_RELEASE_NOTES.txt35
1 files changed, 35 insertions, 0 deletions
diff --git a/library/Smarty/INHERITANCE_RELEASE_NOTES.txt b/library/Smarty/INHERITANCE_RELEASE_NOTES.txt
new file mode 100644
index 000000000..a7d285f0a
--- /dev/null
+++ b/library/Smarty/INHERITANCE_RELEASE_NOTES.txt
@@ -0,0 +1,35 @@
+In Smarty 3.1 template inheritance is a compile time process. All the extending of {block} tags
+is done at compile time and the parent and child templates are compiled in a single compiled template.
+{include} subtemplate could also {block} tags. Such subtemplate could not compiled by it's own because
+it could be used in other context where the {block} extended with a different result. For that reasion
+the compiled code of {include} subtemplates gets also merged in compiled inheritance template.
+
+Merging the code into a single compile template has some drawbacks.
+1. You could not use variable file names in {include} Smarty would use the {include} of compilation time.
+2. You could not use individual compile_id in {include}
+3. Seperate caching of subtemplate was not possible
+4. Any change of the template directory structure between calls was not necessarily seen.
+
+Starting with 3.1.15 some of the above conditions got checked and resulted in an exception. It turned out
+that a couple of users did use some of above and now got exceptions.
+
+To resolve this starting with 3.1.16 there is a new configuration parameter $inheritance_merge_compiled_includes.
+For most backward compatibility its default setting is true.
+With this setting all {include} subtemplate will be merge into the compiled inheritance template, but the above cases
+could be rejected by exception.
+
+
+If $smarty->inheritance_merge_compiled_includes = false; {include} subtemplate will not be merged.
+You must now manually merge all {include} subtemplate which do contain {block} tags. This is done by setting the "inline" option.
+{include file='foo.bar' inline}
+
+1. In case of a variable file name like {include file=$foo inline} you must use the variable in a compile_id $smarty->compile_id = $foo;
+2. If you use individual compile_id in {include file='foo.tpl' compile_id=$bar inline} it must be used in the
+ global compile_id as well $smarty->compile_id = $bar;
+3. If call templates with different template_dir configurations and a parent could same named child template from different folders
+ you must make the folder name part of the compile_id.
+
+
+In the upcomming major release Smarty 3.2 inheritance will no longer be a compile time process.
+All restrictions will be then removed.
+