|
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 |
Saeid Smarty Rookie
Joined: 21 Jun 2010 Posts: 25
|
Posted: Fri Apr 17, 2015 10:43 pm Post subject: Selectively Hiding a variable in debugger |
|
|
Hey I am back after a long time!
I wonder if it is possible to hide certain variables from the debugger?
I have a huge php array which contains language translations. I am debugging using the smarty pop-up debugger. I would like to hide this variable from the debugger. Is there a way?
Code: |
//picking up language file
if($language == "fa") {
require(ROOT_DIR."/core/lang/lang.fa.php");
} else if($language == "en") {
require(ROOT_DIR."/core/lang/lang.en.php");
}
$smarty->assign("lang", $LANG);
|
I mean I don't want to see '$lang' in the smarty debug window!
Please let me know if I my question is not clear!
Thanks! |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Sat Apr 18, 2015 12:01 am Post subject: |
|
|
One of the ways is to write a 'gettext' plugin that will fetch your variable from application scope rather than to pass whole array to the template. (Which isn't very nice either way.) |
|
Back to top |
|
U.Tews Administrator
Joined: 22 Nov 2006 Posts: 5068 Location: Hamburg / Germany
|
Posted: Sat Apr 18, 2015 12:51 pm Post subject: |
|
|
To answer the original question; There is no way to hide variables from th debugger. |
|
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
|