Files
PHPExcel
chart
classes
config
datepicker
html2pdf_v4.03
language
lib
smarty
demo
lexer
libs
.gitattributes
.gitignore
.travis.yml
BUGS
COMPOSER_RELEASE_NOTES.txt
COPYING.lib
ChangeLog
FAQ
INHERITANCE_RELEASE_NOTES.txt
INSTALL
NEWS
NEW_FEATURES.txt
QUICK_START
README
README.md
RELEASE_NOTES
SMARTY_2_BC_NOTES.txt
SMARTY_3.0_BC_NOTES.txt
SMARTY_3.1_NOTES.txt
TODO
change_log.txt
composer.json
smarty2
smarty_3
Smarty-2.6.28.zip
smarty-3.1.29.zip
overlib
progress
templates
templates_c
admin_bearbeiten.php
config.inc.php
detail_prof.php
detail_prof_pdf.php
erf_besausg.php
erf_besschnitt.php
erf_deltas.php
erf_grundgehalt.php
erf_lb_bz.php
erf_lb_einmal.php
erf_lb_fz.php
erf_lz.php
erf_vza.php
func_LB_BZ.php
func_LB_BZ_fiktiv.php
func_LB_FZ.php
func_LB_FZ_alt.php
func_LB_LZ.php
func_LB_einmal.php
func_LB_obergrenze.php
func_LB_obergrenze_Limit.php
func_LB_obergrenze_Limit_stufe1.php
func_LB_obergrenze_Limit_stufe2.php
func_agent.php
func_besschnitt.php
func_doz_nachbes.php
func_doz_synopse.php
func_genUser.php
func_gesamtberechnung.php
func_grundgehalt.php
func_rollenrechte.php
func_zusammenstellung.php
funktionen_bearbeiten.php
graph_einzeljahr.php
graph_jahre.php
hauptframe.php
index.php
indexframe.php
jahrgang.php
korr_verg.php
load.php
login_log.php
logout.php
lzb_excel.php
menuframe.php
parameter.php
pdf_jahr.php
prof_anlegen.php
prof_bearbeiten.php
prof_bearbeiten.php_20180314
prognose.sql
rollen.php
topframe.php
ubersicht_jahr.php
ubersicht_jahr.php_20180829
user_anlegen.php
user_bearbeiten.php
useronline.php
prognose_kehl/lib/smarty/INHERITANCE_RELEASE_NOTES.txt
2023-01-30 08:01:11 +01:00

68 lines
3.1 KiB
Plaintext
Executable File

Starting with version 3.1.28 template inheritance is no longer a compile time process.
All {block} tag parent/child relations are resolved at run time.
This does resolve all known existing restrictions (see below).
The $smarty::$inheritance_merge_compiled_includes property has been removed.
Any access to it is ignored.
This does enable some new features:
Any code outside root {block} tags in child templates is now executed but any output will be ignored.
{extends 'foo.tpl'}
{$bar = 'on'} // assigns variable $bar seen in parent templates
{block 'buh'}{/block}
{extends 'foo.tpl'}
{$bar} // the output of variable bar is ignored
{block 'buh'}{/block}
{block} tags can be dynamically en/disabled by conditions.
{block 'root'}
{if $foo}
{block 'v1'}
....
{/block}
{else}
{block 'v1'}
....
{/block}
{/if}
{/block}
THE FOLLOWING RESTRICTIONS ARE NO LONGER EXISTING:
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.