|
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 |
gordonisnz Smarty Regular
Joined: 05 Sep 2009 Posts: 70
|
Posted: Sun Apr 03, 2022 3:02 am Post subject: use DEBUG within tempalte? |
|
|
Hi, I know when you use the debug command, It creates a POP-UP with all the smarty variables.
Is there a way to use the same function but WITHIN the template/html (no pop-up?)
IE, i found an error on a LIVE website, i want to quickly go in, & see the variables within the HTMl output (comments)
The web users wont see all the variables, but I can if i view source.
i can then fix the error/problem, without annoying pop-ups for the users...
i'll then remove it from the HTML output after all fixed |
|
Back to top |
|
bsmither Smarty Elite
Joined: 20 Dec 2011 Posts: 322 Location: West Coast
|
Posted: Mon Apr 04, 2022 6:57 am Post subject: |
|
|
You might consider reviewing this:
Code: | https://www.smarty.net/docs/en/variable.debugging.ctrl.tpl |
If you have access to the underlying script, you can setup the control to be true only on your IP address ($_SERVER["REMOTE_ADDR"]), to allow the URL invocation of the debug console. |
|
Back to top |
|
AnrDaemon Administrator
Joined: 03 Dec 2012 Posts: 1785
|
Posted: Wed Apr 06, 2022 11:27 am Post subject: |
|
|
I strongly recommend against debugging on live website, no matter the circumstances, as consequences could be dire.
With that warning considered, you could try something like Code: | <!--
{<expression>|var_export:1|replace:">":">"}
--> |
|
|
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
|