Expand url in the current context of the view

 @api private
962079
def _expand_url(url)
      case url
      when String, Symbol
        respond_to?(url) ? send(url) : url
      when Proc
        url.call(self)
      else
        url
      end
    end
226465
def add(name, options)
      fail ArgumentError, "A view hook '#{name}' already exists" if @hooks[name]
      context = options.delete(:context)
      hook = @hooks[name] = Hook.new(name, context, options)
      hook.apply! if @applied
    end
72493
def expand_relative_uri(self, context, uri):
        
        full_uri = urljoin(context, uri)
        if (full_uri != uri):
            print("  WARNING - expanded relative URI to %s" % (full_uri))
            uri = full_uri
        return(uri)
507240
def add_next(self, url, context):
        
        if all([key in context for key in ["redirect_field_name", "redirect_field_value"]]):
            if context["redirect_field_value"]:
                url += "?" + urlencode({
                    context["redirect_field_name"]: context["redirect_field_value"],
                })
        return url
689796
function UrlNode(data){
    this.append = function(next){
        this.next = next;
    };
    this.getData = function(){
        return this.data;
    };
    this.setData = function(data){
        this.data = data;
    }
    this.getNext = function(){
        return this.next;
    };
    this.setParams = function(params){
        var queryParameters = params.split("&");
        if(queryParameters != null){
            this.params = [];
            for(var counter = 0; counter < queryParameters.length; counter++) {
                var keyValuePair = queryParameters[counter].split("=");
                this.params[keyValuePair[0]] = keyValuePair[1];
            }
        } else{
            queryParameters = null;
        }
    };
    this.getParams = function(){
        return this.params;
    };

    //set var's for this object
    var queryParamSplit = data.split("?");
    this.params = null;
    this.data = null;
    this.next = null;
    if(queryParamSplit != null && queryParamSplit.length > 1){
        this.setData(queryParamSplit[0]);
        this.setParams(queryParamSplit[1]);
    } else{
        this.setData(data);
    }
}
87832
function (view/*, locals, fn*/) {
    var args = [].slice.call(arguments, 1);
    var app = this.app;
    if (typeof view === 'string') view = this[view];

    app.render.apply(app, [view].concat(args));
    return this;
  }
627716
def modify(self, view):
        
        view.params['extra_context'][self.get['name']] = self.get['value']
        return view
227071
function expandPath (path, replacements) {
  return R.toPairs(replacements).reduce((path, [key, value]) => path.replace(`{${key}}`, value), path)
}
1324668
function(el, url) {
      if (url) {
        var rect = GetElementViewportRect(el);
        if (rect) {
          rects.push({'url': url,
                       'area': rect.area,
                       'rect': rect});
        }
      }
    }
515775
def expose(url="/", methods=("GET",)):
    

    def wrap(f):
        if not hasattr(f, "_urls"):
            f._urls = []
        f._urls.append((url, methods))
        return f

    return wrap
363701
def url(page)
      @base_url_params ||= begin
                             url_params = merge_get_params(default_url_params)
                             merge_optional_params(url_params)
                           end

      url_params = @base_url_params.dup
      add_current_page_param(url_params, page)

      # Add optional url_builder support
      (@options[:url_builder] || @template).url_for(url_params)
    end
508332
function getViewParams(url, view) {
  let match = view.regex.exec(url);
  if (match) {
    match.shift();
    return zip(view.params, match);
  } else {
    return null;
  }
}
46396
def expand_item(self, item, open_all=True):
        
        self.expand_row(self._view_path_for(item), open_all)
618643
def _add_url(self, chunk):
        
        if 'url' in chunk:
            return chunk
        public_path = chunk.get('publicPath')
        if public_path:
            chunk['url'] = public_path
        else:
            fullpath = posixpath.join(self.state.static_view_path,
                                      chunk['name'])
            chunk['url'] = self._request.static_url(fullpath)
        return chunk
98637
function expandCurrent() {
        var editor = EditorManager.getFocusedEditor();
        if (editor) {
            var cursor = editor.getCursorPos(), cm = editor._codeMirror;
            cm.unfoldCode(cursor.line);
        }
    }
184421
def pages_view(view):
    
    def pages_view_decorator(request, *args, **kwargs):
        # if the current page is already there
        if(kwargs.get('current_page', False) or
                kwargs.get('pages_navigation', False)):
            return view(request, *args, **kwargs)

        path = kwargs.pop('path', None)
        lang = kwargs.pop('lang', None)
        if path:
            from basic_cms.views import details
            response = details(request, path=path, lang=lang,
                only_context=True, delegation=False)
            context = response
            extra_context_var = kwargs.pop('extra_context_var', None)
            if extra_context_var:
                kwargs.update({extra_context_var: context})
            else:
                kwargs.update(context)
        return view(request, *args, **kwargs)
    return pages_view_decorator
758087
function getExpandedUrl(url, options) {
	var x = 0,
		i;
	if (options.urls) {
		i = options.urls.length;
		while (x < i) {
			if (options.urls[x].match === url) {
				if (options.urls[x].expanded) {
					return options.urls[x].expanded;
				}
				return null;
			}
			x++;
		}
	}
	return null;
}