We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Enable Smarty-Debug-Console | Forum

Topic location: Forum home » Development » Themes
Reinhard Sacher
Reinhard Sacher Dec 26 '16
Has anyone managed to enable the debug-console for smarty?

(Would be nice to peek into variables in templates)

according to: 

http://www.smarty.net/docs/en/chapter.debugging.console.tpl


I tried to hack ow_core/smarty.php

class OW_Smarty extends Smarty
{

public function __construct()
{
parent::__construct();

$this->compile_check = false;
$this->force_compile = false;
$this->caching = false;
$this->debugging = true;
$this->debug_tpl = OW_DIR_LIB_VENDOR . 'smarty' . DS . 'smarty' . DS . 'libs' . DS . 'debug.tpl';
if ( OW_DEV_MODE )
{
$this->compile_check = true;
$this->force_compile = true;
}

$this->cache_dir = OW_DIR_SMARTY . 'cache' . DS;
$this->compile_dir = OW_DIR_SMARTY . 'template_c' . DS;
$this->addPluginsDir(OW_DIR_SMARTY . 'plugin' . DS);
$this->enableSecurity('OW_Smarty_Security');
}
}