|
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: Mon Feb 22, 2010 9:29 am Post subject: problem with config load and compilation |
|
|
Hello, I encounter a problem with config_load.
I load a file test.conf, it contains:
Code: |
#Sidebar
sidebar_home = accueil
#topbar menu
product = produits
amenagement_bureau = aménagement de bureau
services = services
catalog = catalogue
|
I load a file the following language:
{config_load file="local`$smarty.get.mylang`.conf"}
At times,
it fails to compile and run without stopping forcing to restart the server.
How to solve this problem? |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Mon Feb 22, 2010 8:18 pm Post subject: |
|
|
What exactly do you mean by "fails to compile and run without stopping"?
Do you get an error message?
Does wrong output gets displayed?
Note: if you use caching Smarty can't automatically detect if a variable config filename has changed. In this case use should use a compile_id to get config file versions separated.
For your case like:
Code: | $smarty->compile_id = $_GET['mylang']; |
|
|
Back to top |
|
gtraxx Smarty Regular
Joined: 08 Jan 2008 Posts: 56
|
Posted: Mon Feb 22, 2010 10:21 pm Post subject: |
|
|
I do not use the caching smarty for now.
I'm having a problem with my multi-language system that uses a. Config_load conf.
The browser runs constantly and can not display the page and the compilation does not do.
I edit the files. Conf and remove ######.
Is this a bug or error on my part?
I do not use caching for I expect the documentation on new features like "createTemplate"
But thank you for the idea of $ smarty-> compile_id = $ _GET [ 'mylang'];
I did not think: D |
|
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
|