public function assign($tpl_var, $value = null, $nocache = false)
    {
        if (is_array($tpl_var)) {
            foreach ($tpl_var as $_key => $_val) {
                if ($_key != '') {
                    $this->tpl_vars[$_key] = new Smarty_Variable($_val, $nocache);
                    if ($this->_objType == 2 && $this->scope) {
                        $this->ext->_updateScope->updateScope($this, $_key);
                    }
                }
            }
        } else {
            if ($tpl_var != '') {
                $this->tpl_vars[$tpl_var] = new Smarty_Variable($value, $nocache);
                if ($this->_objType == 2 && $this->scope) {
                    $this->ext->_updateScope->updateScope($this, $tpl_var);
                }
            }
        }
        return $this;
    }