public function functionPath($params, \Smarty_Internal_Template $template)
    {
        if (!isset($params['route'])) {
            trigger_error("path: missing 'route' parameter");
        }

        array_unshift($params, $params['route']) ;
        unset($params['route']);

        return Url::to($params);
    }
public function functionPath($params, \Smarty_Internal_Template $template)
    {
        if (!isset($params['route'])) {
            trigger_error("path: missing 'route' parameter");
        }

        array_unshift($params, $params['route']) ;
        unset($params['route']);

        return Url::to($params);
    }
public function functionPath ( $ params , \ Smarty_Internal_Template $ template ) { if ( ! isset ( $ params [ 'route' ] ) ) { trigger_error ( "path: missing 'route' parameter" ) ; } array_unshift ( $ params , $ params [ 'route' ] ) ; unset ( $ params [ 'route' ] ) ; return Url :: to ( $ params ) ; }
Smarty template function to get relative URL for using in links

Usage is the following:

{path route='blog/view' alias=$post.alias user=$user.id}

where route is Yii route and the rest of parameters are passed as is.

@param array $params
@param \Smarty_Internal_Template $template

@return string
Smarty template function to get relative URL for using in links