public function setPreviousUrlFunction($params, &$smarty)
    {
        $ignore_current = $this->getParam($params, 'ignore_current', false);

        if ($ignore_current !== false) {
            $this->getRequest()->attributes->set('_previous_url', 'dont-save');
        } else {
            $this->getRequest()->attributes->set('_previous_url', $this->generateUrlFunction($params, $smarty));
        }
    }