Return a link suitable for narrowing on the current item.
171302
def get_narrow_url(self, instance):
        
        text = instance[0]
        request = self.context["request"]
        query_params = request.GET.copy()

        # Never keep the page query parameter in narrowing urls.
        # It will raise a NotFound exception when trying to paginate a narrowed queryset.
        page_query_param = self.get_paginate_by_param()
        if page_query_param and page_query_param in query_params:
            del query_params[page_query_param]

        selected_facets = set(query_params.pop(self.root.facet_query_params_text, []))
        selected_facets.add("%(field)s_exact:%(text)s" % {"field": self.parent_field, "text": text})
        query_params.setlist(self.root.facet_query_params_text, sorted(selected_facets))

        path = "%(path)s?%(query)s" % {"path": request.path_info, "query": query_params.urlencode()}
        url = request.build_absolute_uri(path)
        return serializers.Hyperlink(url, "narrow-url")
647306
async def getlinks(url):
    """"""
    page = Linkfetcher(url)
    await page.linkfetch()
    for i, url in enumerate(page):
        return (i, url)
1028433
def href(self):
        
        url = self.session.base_url + str(self.path)
        if self.path.is_collection and not self.path.is_root:
            return url + 's'
        return url
580476
function link(scope, element, attrs) {
      scope.showProp = showProp;
      scope.display = ModelDefinitions.display;

      function showProp(propDef) {
        return !scope.narrowMode || propDef.displayPriority !== 'low';
      }
    }
403629
def get_item_at(self, *args, **kwargs):
        
        return self.proxy.get_item_at(coerce_point(*args, **kwargs))
1251434
def _GetLink(self):
    
    if self._link is None:
      if self._tar_info:
        self._link = self._tar_info.linkname

    return self._link
409592
def _urlencode(items):
    """"""
    try:
        return urllib.urlencode(items)
    except UnicodeEncodeError:
        return urllib.urlencode([(k, smart_str(v)) for k, v in items])
785459
def attr(aid):
    '''
    
    '''
    def _attr(ctx):
        return ctx.current_link[ATTRIBUTES].get(aid)
    return _attr
11246
def return_current_uri_subpage(self):
        
        uri = post_slash("%s%s/%s/%s" % (post_slash(self.current_dir()),
                         self.slots['page'], self.slots['item'],
                         self.slots['subpage']))
        return uri
1146040
def link(self):
    """"""
    if not self.IsLink():
      return ''

    location = getattr(self.path_spec, 'location', None)
    if location is None:
      return ''

    return self._file_system.GetDataByPath(location)
492553
def _links(self):
        """"""
        total = 0.0
        for value in self.link.values():
            total += value
        return total
591217
def _get_link(self, cobj):
        """"""

        fullname = cobj['module_short'] + '.' + cobj['name']
        try:
            value = self._searchindex['objects'][cobj['module_short']]
            match = value[cobj['name']]
        except KeyError:
            link = False
        else:
            fname_idx = match[0]
            objname_idx = str(match[1])
            anchor = match[3]

            fname = self._searchindex['filenames'][fname_idx]
            # In 1.5+ Sphinx seems to have changed from .rst.html to only
            # .html extension in converted files. Find this from the options.
            ext = self._docopts.get('FILE_SUFFIX', '.rst.html')
            fname = os.path.splitext(fname)[0] + ext
            if self._is_windows:
                fname = fname.replace('/', '\\')
                link = os.path.join(self.doc_url, fname)
            else:
                link = posixpath.join(self.doc_url, fname)

            if anchor == '':
                anchor = fullname
            elif anchor == '-':
                anchor = (self._searchindex['objnames'][objname_idx][1] + '-' +
                          fullname)

            link = link + '#' + anchor

        return link
637066
def get(self, item):
        
        if item in self:  # noqa
            item = getattr(self, item)
            return item()
1229929
function getCurrentList(opts: Options, value: Value, block?: Block): ?Block {
    const item = getCurrentItem(opts, value, block);

    if (!item) {
        return null;
    }

    return getListForItem(opts, value, item);
}
364072
def links(cls, page):
    """"""
    for match in cls.HREF_RE.finditer(page):
      yield cls.href_match_to_url(match)
1351369
def get(cls, scope=None):
        """"""
        if scope is None:
            scope = cls.default
        if isinstance(scope, string_types) and scope in cls._keywords:
            return getattr(cls, scope)
        return scope
546991
def current_item(self):
        """"""
        if self._history and self._index >= 0:
            self._check_index()
            return self._history[self._index]