Find the desired template and call it within the proper context
 @param [String/Symbol] template name of the template to render
 @param [Array] arguments optional arguments to be passed to template
 @return result of rendering
480916
def render(template, *arguments)
      #
      # find the right renderer we need
      #
      block, handler = find_template(template)

      raise TemplateNotFound if block.nil?

      ctx = handler.new(self)
      ctx.params = @params
      ctx.request = @request

      ctx.instance_exec(*arguments, &block)
    end
677987
def render_template(request, app, template_name, context=None, subdir="templates", def_name=None):
    '''
    
    '''
    return get_template(app, template_name, subdir).render(context, request, def_name)
778215
def _default_template_args(self, content_template):
    """"""
    def include(text, args):
      template_name = pystache.render(text, args)
      return self._renderer.render_name(template_name, args)
    # Our base template calls include on the content_template.
    ret = {'content_template': content_template}
    ret['include'] = lambda text: include(text, ret)
    return ret
111435
def render_404_template!(template_name)
      VIEW_TEMPLATE_ENGINES.each do |engine, extension|
        @preferred_extension = extension.to_s
        find_template(settings.views, template_name, engine) do |file|
          next unless File.file?(file)
          halt send(extension, template_name.to_sym, layout: false)
        end
      end
    end
793691
public Template getTemplate(String name, Object args) throws IOException, ParseException {
        if (args instanceof String)
            return getTemplate(name, (String) args);
        if (args instanceof Locale)
            return getTemplate(name, (Locale) args);
        return getTemplate(name, null, null, args);
    }
956232
def find_template(t)
      x = menus[t]
      if x
        return x, Gopher::Rendering::Menu
      end
      x = text_templates[t]
      if x
        return x, Gopher::Rendering::Text
      end
    end
539888
def render(context, locals = {}, &block)
      return file.read if !template?
      ensure_loaded
      pipeline.inject(@template_text) do |text, processor|
        template = processor.new(file.to_s, @template_start_line) { text }
        template.render(context, locals, &block)
      end
    end
702761
private Map<Any2<Integer, String>, String> resolve_template_args_(Matcher matcher) {
        return template_.getArguments().stream()
                .collect(Collectors.toMap(arg -> arg, arg -> arg.mapCombine(matcher::group, matcher::group)));
    }
62628
def render(template, context=None, **kwargs):
    
    renderer = Renderer()
    return renderer.render(template, context, **kwargs)
719231
def template_string(context, template):
    ''
    if not isinstance(context, Context):
        context = Context(context)
    return Template(template).render(context)
369306
def generate(template_name, object_binding)
      erb = ERB.new(File.read(File.join(template_path, template_name)), nil, "<>")
      erb.result(object_binding)
    end
290645
def render_ruby(engine, template, options={}, locals={}, &block)
      options, template = template, nil if template.is_a?(Hash)
      template = Proc.new { block } if template.nil?
      render engine, template, options, locals
    end
817534
def render_to_string(self, template, context=None, def_name=None, subdir='templates'):
        ''''''
        template_adapter = self.get_template_loader(subdir).get_template(template)
        return getattr(template_adapter, 'render')(context=context, request=self.request, def_name=def_name)
1280105
def render(template, **kwargs):
    
    import jinja2
    import os.path as path

    searchpath = path.join(path.dirname(__file__), 
        "templates") 
    loader = jinja2.FileSystemLoader(searchpath=searchpath)
    env = jinja2.Environment(loader=loader)
    temp = env.get_template(template)

    return temp.render(**kwargs)
1156477
def render(template, context, partials={}, state=None):
    
    # Create a new state by default
    state = state or State()

    # Add context to the state dict
    if isinstance(context, Context):
        state.context = context
    else:
        state.context = Context(context)

    # Add any partials to the state dict
    if partials:
        state.partials.push(partials)

    # Render the rendered template
    return __render(make_unicode(template), state)
1258549
function renderTemplate(fragment, templateName) {
    if (templateName === 'none') return fragment._txt;
    var t = generator.template$[templateName];
    if (!t) {
      log('Unknown template %s for %s, using default.', templateName, fragment._href);
      t = generator.template$.default;
    }

    var out;
    try { out = t(fragment); }
    catch(err) {
      var msg = u.format('Error rendering %s\n\ntemplate: %s\n',
                         fragment._href, templateName, err.stack || err);
      log(msg);
      out = opts.production ? '' : '<pre>' + esc(msg) + '</pre>';
    }

    return out;
  }
96644
public static PredicateTemplate predicateTemplate(String template, List<?> args) {
        return predicateTemplate(TemplateFactory.DEFAULT.create(template), args);
    }