Adds rendering option.

 ==render :super

 This renders the "super" template, i.e. the one hidden by the plugin
974461
def render_with_super(*args, &block)
      if args.first == :super
        last_view = view_stack.last || {:view => instance_variable_get(:@virtual_path).split('/').last}
        options = args[1] || {}
        options[:locals] ||= {}
        options[:locals].reverse_merge!(last_view[:locals] || {})
        if last_view[:templates].nil?
          last_view[:templates] = lookup_context.find_all_templates(last_view[:view], last_view[:partial], options[:locals].keys)
          last_view[:templates].shift
        end
        options[:template] = last_view[:templates].shift
        view_stack << last_view
        result = render_without_super options
        view_stack.pop
        result
      else
        options = args.first
        if options.is_a?(Hash)
          current_view = {:view => options[:partial], :partial => true} if options[:partial]
          current_view = {:view => options[:template], :partial => false} if current_view.nil? && options[:template]
          current_view[:locals] = options[:locals] if !current_view.nil? && options[:locals]
          view_stack << current_view if current_view.present?
        end
        result = render_without_super(*args, &block)
        view_stack.pop if current_view.present?
        result
      end
    end
1357820
def plugin(plugin_key=None):
    
    p = None
    if plugin_key:
        try:
            p = db_plugin_instance.plugin_get(plugin_key)
        except KeyError:
            logger.error(u"Plugin '{}' not found".format(plugin_key))

    return render_template("plugin.html", title="Plugins", plugin=p)
38515
def add_options(*args, &block)
      options = args.extract_options!
      if !options.is_a?(HashWithIndifferentAccess)
        options = options.with_indifferent_access
      end
      options[:block] = block if block
      if render_strategy.nil?
        self.render_strategy = if options.is_a?(HashWithRenderStrategy)
          options.render_strategy
        else
          RENDERING_STRATEGIES.detect {|render_strategy| options[render_strategy].present? }
        end
      end

      super(*args, options)
    end
821095
def options_for_render(options = {})
      style = options_for_style(options[:style] || DEFAULT_OPTIONS[:style])
      DEFAULT_OPTIONS.merge(style).merge(options)
    end
810997
def render(self, template, fail='## :todo: add {template}'):
        
        try:
            return self._templates[template].render(scaffold=self)
        except KeyError:
            return fail.format(template=template)
1227955
def render_to_string(self, request, template, context, content_instance=None):
        
        if not content_instance:
            content_instance = PluginContext(request)

        content_instance.update(context)
        return render_to_string(template, content_instance.flatten(), request=request)
645051
def render(self, *args, **kwargs):
        """"""
        if not self.childs and "href" in self.attrs:
            return self.clone()(self.attrs["href"]).render(*args, **kwargs)
        return super().render(*args, **kwargs)
282844
function(el, template, context, opts) {
      opts = opts || {};
      if (_.isString(template)) {
        opts.newHTML = template;
      }
      templateRenderer.render(el, template, context, opts);
    }
742557
def render(template)
      template.render(config.variables.deep_merge(options[:globals]), strict_variables: true).tap do
        if template.errors&.length&.positive?
          puts template.errors
          raise template.errors.map(&:to_s).join('; ')
        end
      end
    end
91563
def render(options)
      options = options_for_render(options)
      links = links_for_render(options)

      LinkCollection.new(context, links, options)
    end
1255979
def before_render(self):
        
        # Render the Add button if the user has the AddClient permission
        if check_permission(AddClient, self.context):
            self.context_actions[_("Add")] = {
                "url": "createObject?type_name=Client",
                "icon": "++resource++bika.lims.images/add.png"
            }

        # Display a checkbox next to each client in the list if the user has
        # rights for ModifyPortalContent
        self.show_select_column = check_permission(ModifyPortalContent,
                                                   self.context)
389618
def render(self, name, value, attrs=None, renderer=None):
        """"""
        if django.VERSION >= (1, 11):
            return super(BetterFileInput, self).render(name, value, attrs)

        t = render_to_string(
            template_name=self.template_name,
            context=self.get_context(name, value, attrs),
        )
        return mark_safe(t)
360763
function renderModule(context, options) {
	var  cacheKey
		,modSourceTemplate
		,mergedData
		,html
	;

	// this check is used when rendering isolated modules or views for development and testing (in the default layout!).
	// skip any modules that are not THE module or THE view.
	// view: skip all modules that have the attribute _isLayout="true"
	// module: skip all other modules
	if (
		context.skipModules === true ||                         // case: module
		context.skipModules == 'layout' && options._isLayout    // case: view
		)
	{ return ''; }

	options.template = options.template || options.name;
	options.tag = options.tag || defaults.tag;
	options.data = options.data || {};
	options.data.moduleNestingLevel = typeof context.moduleNestingLevel === 'undefined' ? 0 : context.moduleNestingLevel + 1;
	autoIncrementIndent = options.data.moduleNestingLevel > 0 ? 1 : false;
	options.data.indent = options.indent || autoIncrementIndent || context.indent || 0;

	// merge the request context and data in the module include, with the latter trumping the former.
	mergedData = _.merge({}, context, options.data);

	// create a unique identifier for the module/template combination
	cacheKey = options.name + ' ' + options.template;

	// If addTest exists it means we should pass module options into it for later client-side module testing.
	context._locals && context._locals.addTest && context._locals.addTest(options);

	// force reading from disk in development mode
	NODE_ENV == 'development' && (cache[cacheKey] = null);

	// if the module/template combination is cached use it, else read from disk and cache it.
	modSourceTemplate = cache[cacheKey] || (cache[cacheKey] = getModTemplate(options));

	// render the module source in the locally merged context
	// moduleSrc is a {{variable}} in the moduleWrapper template
	try {
		options.moduleSrc = modSourceTemplate.fn(mergedData);
	}
	catch (e) {
		if (process.env.NODE_ENV != 'test') {
			if (e instanceof RenderError)   // if this is our error from a nested template rethrow it.
				throw e;
			else                            // if this is the original Handlebars error, make it useful
				throw new RenderError('Module: ' + options.name + ', Template: ' + options.template + cfg.templateExtension +'\n'+ e.toString().replace(/^Error/, 'Reason'));
		}
	}


	if (options.noWrapper) {
		html = options.moduleSrc;
	}
	else {
		// if we have a persisted read error, add the error class to the module.
		modSourceTemplate.err && (options.classes = options.classes ? options.classes + ' xtc-error' : 'xtc-error');

		if (annotateModules) {
			options._module = modSourceTemplate.name;
			options._file = modSourceTemplate.file;
			options._path = modSourceTemplate.path;
			options._repository = modSourceTemplate.repository;
		}

		// render the wrapper template
		html = wrapperFn(options);
	}

	// manage indentation
	if (mergedData.indent) {
		html = utils.indent(html, mergedData.indent, cfg.indentString);
	}

	return html;
}
1109155
def render(context_scope = nil, locals = nil, &block)
      apply(context_scope, locals, &block) if context_scope || locals || block

      cache_results do
        send("to_#{@_options[:format]}")
      end
    end
264408
function(templateName, options) {
        var template = this.templates[templateName];
        if (!template) {
            throw new Error('Unknown template: ' + templateName);
        }

        if (typeof template === 'function') {
            var templateResult = template(options);
            return typeof templateResult === 'string' ? templateResult.trim() : templateResult;
        } else if (template.render) {
            return template.render(options).trim();
        } else {
            return template.toString().trim();
        }
    }
1003545
def setup_template_render(path, config_path):
    

    # initialization
    cp = get_embedded_config(path)
    output = ''
    filename = os.path.basename(path)

    # use meta-data if not empty for rendering
    if cp.has_option(filename, 'render-function'):
        render_function_name = cp.get(filename, 'render-function')
        render_function = eval(render_function_name)
        output = render_function(path, cp)

    # read configuration file for rendering
    elif os.path.exists(config_path):
        cp.read(config_path)

        # render template
        if cp.has_option(filename, 'render-function'):
            render_function_name = cp.get(filename, 'render-function')
            render_function = eval(render_function_name)
            output = render_function(path, cp)
        else:
            output = render_default(path, cp)

    # if no configuration file is present
    # then render the default template
    else:
        output = render_default(path, cp)

    return output
463105
def _render(template, render, renderer, template_dict, opts):
    '''
    
    '''
    if render:
        if template_dict is None:
            template_dict = {}
        if not renderer:
            renderer = opts.get('renderer', 'jinja|yaml')
        rend = salt.loader.render(opts, {})
        blacklist = opts.get('renderer_blacklist')
        whitelist = opts.get('renderer_whitelist')
        ret = compile_template(template, rend, renderer, blacklist, whitelist, **template_dict)
        if salt.utils.stringio.is_readable(ret):
            ret = ret.read()
        if six.text_type(ret).startswith('#!') and not six.text_type(ret).startswith('#!/'):
            ret = six.text_type(ret).split('\n', 1)[1]
        return ret
    with salt.utils.files.fopen(template, 'r') as fh_:
        return fh_.read()