renders a recursive pidList to reference content from a list of pages
775335
public function user_getTreeList()
    {
        $pidList = $this->getTSFE()->register['tt_content_shortcut_recursive']
            ? $this->cObj->getTreeList(
                $this->cObj->data['uid'],
                $this->getTSFE()->register['tt_content_shortcut_recursive']
            )
            : '';
        $this->getTSFE()->register['pidInList'] = trim($this->cObj->data['uid'] . ',' . $pidList, ',');
    }
13252
def render(self, *args, **kwargs):
        '''
        
        '''

        uid_with_str = args[0]

        slug = kwargs.get('slug', False)

        with_title = kwargs.get('with_title', False)

        glyph = kwargs.get('glyph', '')

        kwd = {
            'glyph': glyph
        }
        curinfo = MCategory.get_by_uid(uid_with_str)

        sub_cats = MCategory.query_sub_cat(uid_with_str)

        if slug:
            tmpl = 'modules/info/catalog_slug.html'

        else:
            tmpl = 'modules/info/catalog_of.html'
        return self.render_string(tmpl,
                                  pcatinfo=curinfo,
                                  sub_cats=sub_cats,
                                  recs=sub_cats,
                                  with_title=with_title,
                                  kwd=kwd)
938027
def render_collection(collection, member_fields, view = nil, context: Attributor::DEFAULT_ROOT_CONTEXT)
      render(collection, [member_fields], view, context: context)
    end
385048
def page_list(
    request, template_name='wakawaka/page_list.html', extra_context=None
):
    
    page_list = WikiPage.objects.all()
    page_list = page_list.order_by('slug')

    template_context = {
        'page_list': page_list,
        'index_slug': getattr(settings, 'WAKAWAKA_DEFAULT_INDEX', 'WikiIndex'),
    }
    template_context.update(extra_context or {})
    return render(request, template_name, template_context)
559075
def _pages_to_generate(self):
        ''''''
        # right now it gets all the files. In theory, It should only
        # get what's changed... but the program is not doing that yet.

        all_pages = self.get_page_names()
        # keep only those whose status is published
        ptg = []
        for slug in all_pages:
            p = s2page.Page(self, slug, isslug=True)
            if p.published:
                ptg.append({'slug': p.slug, 'title':p.title, 'date': p.creation_date })

        # sort the ptg array in reverse chronological order of its entries.
        sptg = sorted(ptg, key=lambda x : x['date'],reverse=True)
        res = [ pinfo['slug'] for pinfo in sptg]
        return res
961735
def get_pages_from_id_list(id_list):
    '''
    
    '''
    page_list = []
    for id_ in id_list:
        try:
            page_list.append(
                Page.objects.get(id=id_).specific)
        except ObjectDoesNotExist:
            logging.error(
                "Attempted to fetch non-existent"
                " page with id of {}".format(id_))
    return page_list
1071278
def autopage(self):
        
        while self.items:
            yield from self.items
            self.items = self.fetch_next()
1233493
def _render_content_list(self, content, depth, dstack, **settings):
        
        result = []
        i = 0
        size = len(content)
        for value in content:
            ds = [(depth, i, size)]
            ds = dstack + ds
            if isinstance(value, dict):
                result.append(self._render_item(ds, "[{}]".format(i), **settings))
                result += self._render_content_dict(value, depth + 1, ds, **settings)
            elif isinstance(value, list):
                result.append(self._render_item(ds, "[{}]".format(i), **settings))
                result += self._render_content_list(value, depth + 1, ds, **settings)
            else:
                result.append(self._render_item(ds, value, **settings))
            i += 1
        return result
463132
function tree (toc, tpl) {
  if ( tpl === void 0 ) tpl = '';

  if (!toc || !toc.length) { return '' }

  toc.forEach(function (node) {
    tpl += "<li><a class=\"section-link\" href=\"" + (node.slug) + "\">" + (node.title) + "</a></li>";
    if (node.children) {
      tpl += "<li><ul class=\"children\">" + (tree(node.children)) + "</li></ul>";
    }
  });

  return tpl
}
282486
def _render_list(self, items, empty='<pre>&lt;empty&gt;</pre>'):
    
    if not items or len(items) == 0:
      self._segments.append(empty)
      return
    self._segments.append('<ul>')
    for o in items:
      self._segments.append('<li>')
      self._segments.append(str(o))
      self._segments.append('</li>')
    self._segments.append('</ul>')
1271567
def render(self, container, rerender=False):
        """"""
        if rerender:
            container.clear()
            if not self._rerendering:
                # restore saved state on this chain's 1st container on this page
                self._state = copy(self._fresh_page_state)
                self._rerendering = True
        try:
            self.done = False
            self.flowables.flow(container, last_descender=None,
                                state=self._state)
            # all flowables have been rendered
            if container == self.last_container:
                self._init_state()    # reset state for the next rendering loop
            self.done = True
        except PageBreakException as exc:
            self._state = exc.flowable_state
            self._fresh_page_state = copy(self._state)
            raise
        except EndOfContainer as e:
            self._state = e.flowable_state
            if container == self.last_container:
                # save state for when ReflowRequired occurs
                self._fresh_page_state = copy(self._state)
        except ReflowRequired:
            self._rerendering = False
            raise
671840
def render_thumb_gallery(list, opts = {})
      opts.reverse_merge!(
        renderer: Integral::SwiperListRenderer,
        item_renderer: Integral::PartialListItemRenderer,
        item_renderer_opts: {
          partial_path: 'integral/shared/gallery/thumb_slide',
          wrapper_element: 'div',
          image_version: :small,
          html_classes: 'swiper-slide'
        }
      )

      opts[:renderer].render(list, opts).html_safe
    end
910456
function(newNodeLists, parentNodeList, render, context, args) {
		var itemNodeList = [];

		if (parentNodeList) {
			// With a supplied parent list, "directly" register the new nodeList
			//  as a child.
			nodeLists.register(itemNodeList, null, true, true);
			itemNodeList.parentList = parentNodeList;
			itemNodeList.expression = "#each SUBEXPRESSION";
		}

		// call the renderer, passing in the new nodeList as the last argument
		var itemHTML = render.apply(context, args.concat([itemNodeList])),
			// and put the output into a document fragment
			itemFrag = frag(itemHTML);

		// get all the direct children of the frag
		var children = canReflect.toArray(childNodes(itemFrag));
		if (parentNodeList) {
			// if a parent list was supplied, children of the frag become the
			//  child nodeList items.
			nodeLists.update(itemNodeList, children);
			newNodeLists.push(itemNodeList);
		} else {
			// If no parent nodeList, register the new array of frag children as a nodeList
			//  and push into the nodeLists
			newNodeLists.push(nodeLists.register(children));
		}
		return itemFrag;
	}
688184
function tree (list) {
  var mapped = {}
  for (var i = 0, item; i < list.length; i++) {
    item = list[i]
    if (!item || !item.id) continue
    mapped[item.id] = item
  }

  var result = []
  for (var ii = 0; ii < list.length; ii++) {
    item = list[ii]

    if (!item) continue
    /* jshint -W041 */
    if (item.pid == undefined && item.parentId == undefined) {
      result.push(item)
      continue
    }
    var parent = mapped[item.pid] || mapped[item.parentId]
    if (!parent) continue
    if (!parent.children) parent.children = []
    parent.children.push(item)
  }
  return result
}
866010
function indexPages(header) {
    var map = {};
    u.each(generator.pages, function(page) {
      u.each(u.getaVals(page, header), function(val) {
        map[val] = page;
      });
    });
    return map;
  }
98695
def run
      loop do
        link, referer, depth = @link_queue.deq

        break if link == :END

        @http.fetch_pages(link, referer, depth).each { |page| @page_queue << page }

        delay
      end
    end
1031577
def file_list(ref)
      if (sha = @access.ref_to_sha(ref))
        commit = @access.commit(sha)
        tree_map_for(sha).inject([]) do |list, entry|
          next list if entry.name.start_with?('_')
          next list if @page_class.valid_page_name?(entry.name)
          list << entry.file(self, commit)
        end
      else
        []
      end
    end