Render the default content for this component as it is defined in the context.
484277
def default
      handler_name = @handler_name
      proc {
        comp = @context.elements[handler_name][:content]
        if comp.kind_of?(Proc)
          comp.call
        else
          Context.wipe handler_name
          Context.render comp, handler_name
        end
      }
    end
90772
def _render(self, context):
        "  "
        if self.template_name:
            t = loader.get_template(self.template_name)
        else:
            t_list = self._get_template_list()
            t = loader.select_template(t_list)

        context.update(self.get_context())
        resp = t.render(context)
        context.pop()
        return resp
555509
protected function render ()
  {
    $prop = $this->props;
    if (exists ($prop->src))
      $this->context->getAssetsService ()->addStylesheet ($prop->src, $this->props->prepend);
    else if ($this->hasChildren ())
      $this->context->getAssetsService ()->addInlineCss (self::getRenderingOfSet ($this->getChildren ()), $prop->name,
        $this->props->prepend);
  }
650391
protected function renderContext()
    {
        if ($this->needsToSetRailsContext) {
            $this->needsToSetRailsContext = false;

            return sprintf(
                '<script type="application/json" id="js-react-on-rails-context">%s</script>',
                $this->jsonEncode($this->contextProvider->getContext(false))
            );
        }

        return '';
    }
492654
def render_default(data, format=:markdown, name='render_default.md')
      # set instance vars so we're able to render data without a wiki or page.
      @format = format
      @name   = name

      chain = [:Metadata, :PlainText, :Emoji, :TOC, :RemoteCode, :Code, :Sanitize, :WSD, :Tags, :Render]

      filter_chain = chain.map do |r|
        Gollum::Filter.const_get(r).new(self)
      end

      process_chain data, filter_chain
    end
807396
def render(self, context, instance, placeholder):
        
        context = super(CMSRandomEntriesPlugin, self).render(
            context, instance, placeholder)
        context['template_to_render'] = (str(instance.template_to_render) or
                                         'zinnia/tags/entries_random.html')
        return context
215089
def render(self, ctx=None):
        '''
        
        '''
        if ctx is None:
            ctx = RenderContext()
        ctx.push(self)
        self._initialize()
        offset = self.offset if self.offset else 0
        self._fields[self._field_idx].set_offset(offset)
        rendered = self._fields[self._field_idx].render(ctx)
        self.set_current_value(rendered)
        ctx.pop()
        return self._current_rendered
1136888
def _render_content(self, content, **settings):
        
        settings[self.SETTING_WIDTH] = TERMINAL_WIDTH
        return super()._render_content(content, **settings)
17424
def render(self, name, context):
        """"""
        if Generator.strict:
            self.env.undefined = TestableUndefined
        else:
            self.env.undefined = Undefined
        template = self.get_template(name)
        return template.render(context)
1103283
def prepare(self, context):
        
        self.params = {}

        # no params, not even a newline
        if not self.nodelist:
            return

        # just static text, no vars, assume one TextNode
        if not self.nodelist.contains_nontext:
            text = self.nodelist[0].s.strip()

        # vars in params, we have to render
        else:
            context.push()
            context['object'] = self.obj
            text = self.nodelist.render(context)
            context.pop()

        if text:
            self.params = self.resolve_params(text)

        # override the default template from the parameters
        if 'template_name' in self.params:
            self.template_name = self.params['template_name']
90885
def render(self, context):
        
        user = self._get_value(self.user_key, context)
        feature = self._get_value(self.feature, context)

        if feature is None:
            return ''

        allowed = show_feature(user, feature)
        return self.nodelist.render(context) if allowed else ''
1317634
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WFigure figure = (WFigure) component;
		XmlStringBuilder xml = renderContext.getWriter();

		boolean renderChildren = isRenderContent(figure);

		xml.appendTagOpen("ui:figure");
		xml.appendAttribute("id", component.getId());
		xml.appendOptionalAttribute("class", component.getHtmlClass());
		xml.appendOptionalAttribute("track", component.isTracking(), "true");
		if (FigureMode.LAZY.equals(figure.getMode())) {
			xml.appendOptionalAttribute("hidden", !renderChildren, "true");
		} else {
			xml.appendOptionalAttribute("hidden", component.isHidden(), "true");
		}

		FigureMode mode = figure.getMode();
		if (mode != null) {
			switch (mode) {
				case LAZY:
					xml.appendAttribute("mode", "lazy");
					break;
				case EAGER:
					xml.appendAttribute("mode", "eager");
					break;
				default:
					throw new SystemException("Unknown figure mode: " + figure.getMode());
			}
		}

		xml.appendClose();

		// Render margin
		MarginRendererUtil.renderMargin(figure, renderContext);

		if (renderChildren) {
			// Label
			figure.getDecoratedLabel().paint(renderContext);

			// Content
			xml.appendTagOpen("ui:content");
			xml.appendAttribute("id", component.getId() + "-content");
			xml.appendClose();
			figure.getContent().paint(renderContext);
			xml.appendEndTag("ui:content");
		}

		xml.appendEndTag("ui:figure");
	}
601720
def render(self, **context):
		
		# Make the complete context we'll use.
		localns = self.envs.copy()
		localns.update(context)

		try:
			exec(str(self.code), None, localns)
			return localns[Liquid.COMPLIED_RENDERED_STR]
		except Exception:
			stacks = list(reversed(traceback.format_exc().splitlines()))
			for stack in stacks:
				stack = stack.strip()
				if stack.startswith('File "<string>"'):
					lineno = int(stack.split(', ')[1].split()[-1])
					source = []
					if 'NameError:' in stacks[0]:
						source.append('Do you forget to provide the data?')

					import math
					source.append('\nCompiled source (use debug mode to see full source):')
					source.append('---------------------------------------------------')
					nlines = len(self.code.codes)
					nbit   = int(math.log(nlines, 10)) + 3
					for i, line in enumerate(self.code.codes):
						if i - 7 > lineno or i + 9 < lineno: continue
						if i + 1 != lineno:
							source.append('  ' + (str(i+1) + '.').ljust(nbit) + str(line).rstrip())
						else:
							source.append('* ' + (str(i+1) + '.').ljust(nbit) + str(line).rstrip())

					raise LiquidRenderError(
						stacks[0], 
						repr(self.code.codes[lineno - 1]) + 
						'\n' + '\n'.join(source) + 
						'\n\nPREVIOUS EXCEPTION:\n------------------\n' + 
						'\n'.join(stacks) + '\n' +
						'\nCONTEXT:\n------------------\n' +
						'\n'.join(
							'  ' + key + ': ' + str(val) 
							for key, val in localns.items() if not key.startswith('_liquid_') and not key.startswith('__')
						) + '\n'
					)
			raise
36308
def render(self, ctx=None):
        '''
        
        '''
        self._initialize()
        if not self.is_default():
            self._current_rendered = self._encode_value(self._current_value)
        return self._current_rendered
719863
@Override
	public void render() {
		final String callback = Request.getParam(callbackParamName, Response.DEFAULT_CALLBACK_NAME);
		this.text = StrUtil.format("{}({})", callback, this.text);
		super.render();
	}
1119597
@Override
	public void doRender(final WComponent component, final WebXmlRenderContext renderContext) {
		WStyledText text = (WStyledText) component;
		XmlStringBuilder xml = renderContext.getWriter();
		String textString = text.getText();

		if (textString != null && textString.length() > 0) {
			xml.appendTagOpen("ui:text");

			xml.appendOptionalAttribute("class", component.getHtmlClass());
			switch (text.getType()) {
				case EMPHASISED:
					xml.appendAttribute("type", "emphasised");
					break;

				case HIGH_PRIORITY:
					xml.appendAttribute("type", "highPriority");
					break;

				case LOW_PRIORITY:
					xml.appendAttribute("type", "lowPriority");
					break;

				case MEDIUM_PRIORITY:
					xml.appendAttribute("type", "mediumPriority");
					break;

				case ACTIVE_INDICATOR:
					xml.appendAttribute("type", "activeIndicator");
					break;

				case MATCH_INDICATOR:
					xml.appendAttribute("type", "matchIndicator");
					break;

				case INSERT:
					xml.appendAttribute("type", "insert");
					break;

				case DELETE:
					xml.appendAttribute("type", "delete");
					break;

				case MANDATORY_INDICATOR:
					xml.appendAttribute("type", "mandatoryIndicator");
					break;

				case PLAIN:
				default:
					xml.appendAttribute("type", "plain");
					break;
			}

			switch (text.getWhitespaceMode()) {
				case PARAGRAPHS:
					xml.appendAttribute("space", "paragraphs");
					break;

				case PRESERVE:
					xml.appendAttribute("space", "preserve");
					break;

				case DEFAULT:
					break;

				default:
					throw new IllegalArgumentException("Unknown white space mode: " + text.
							getWhitespaceMode());
			}

			xml.appendClose();

			if (WStyledText.WhitespaceMode.PARAGRAPHS.equals(text.getWhitespaceMode())) {
				textString = text.isEncodeText() ? WebUtilities.encode(textString) : HtmlToXMLUtil.unescapeToXML(textString);
				writeParagraphs(textString, xml);
			} else {
				xml.append(textString, text.isEncodeText());
			}

			xml.appendEndTag("ui:text");
		}
	}
945178
def render(self, context):
        """"""

        content = mark_safe(self.get_content_from_context(context))
        if not content:
            return ''
        if self.parsed:
            try:
                t = template.Template(content, name=self.name)
                content = mark_safe(t.render(context))
            except TemplateSyntaxError as error:
                if global_settings.DEBUG:
                    content = PLACEHOLDER_ERROR % {
                        'name': self.name,
                        'error': error,
                    }
                else:
                    content = ''
        if self.as_varname is None:
            return content
        context[self.as_varname] = content
        return ''