|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
gtraxx Smarty Regular
Joined: 08 Jan 2008 Posts: 56
|
Posted: Fri Nov 12, 2010 10:47 am Post subject: errror config load in parent template |
|
|
Hello, I use config_load to load in the entire application variables that are translated.
However, since the stable release, I am obliged to call my files containing the variables in each TPL, before I called him once.
Code: | {config_load file="localize_{sessionlang}.conf"} |
Can not call the file once as a parent. |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Fri Nov 12, 2010 1:58 pm Post subject: |
|
|
In Smarty3 the default scope of config variables loaded with {config_load} has always been local. That means they are available in the templates which has the {config_load} and it's subtemplates, but not in the parent template.
But you can make them available in the parten template by using the scope attribute {config_load .... scope=parent}.
nothing has change here since a while. (But it's different from Smarty2 as it did not have real scopes} |
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|