call this to render partial source embedded in a template
 partial source is rendered with its own scope/data but shares
 its parent template's output object
175884
def __partial(source, data={})
      if source.kind_of?(Source)
        Undies::Template.new(source, data, @_undies_io)
      else
        @_undies_io.current.partial(source.to_s)
      end
    end
311276
def render(self, *args, **kwargs):
        """"""
        # args kwargs API provided for last minute content injection
        # self._reverse_mro_func('pre_render')
        pretty = kwargs.pop("pretty", False)
        if pretty and self._stable != "pretty":
            self._stable = False

        for arg in args:
            self._stable = False
            if isinstance(arg, dict):
                self.inject(arg)
        if kwargs:
            self._stable = False
            self.inject(kwargs)

        # If the tag or his contents are not changed and we already have rendered it
        # with the same attrs we skip all the work
        if self._stable and self._render:
            return self._render

        pretty_pre = pretty_inner = ""
        if pretty:
            pretty_pre = "\n" + ("\t" * self._depth) if pretty else ""
            pretty_inner = "\n" + ("\t" * self._depth) if len(self.childs) > 1 else ""
        inner = self.render_childs(pretty) if not self._void else ""

        # We declare the tag is stable and have an official render:
        tag_data = (
            pretty_pre,
            self._get__tag(),
            self.render_attrs(),
            inner,
            pretty_inner,
            self._get__tag()
        )[: 6 - [0, 3][self._void]]
        self._render = self._template % tag_data
        self._stable = "pretty" if pretty else True
        return self._render
993776
function render(filename, options, callback) {
  var isAsync = callback && typeof callback === 'function';

  if (!isAsync) {
    return renderSync(filename, options)
  }

  getTemplate(filename, options, function(err, template) {
    if (err) {
      return callback(err);
    }

    template.render({ model: options, }, callback);
  });
}
864699
def partial(template_path, options = {})
      raise RablRails::PartialError.new("No object was given to partial #{template_path}") unless options[:object]
      object = options[:object]
      @_locals = options[:locals].freeze

      return [] if object.respond_to?(:empty?) && object.empty?

      template = RablRails::Library.instance.compile_template_from_path(template_path, @_context)
      if object.respond_to?(:each)
        object.map { |o| sub_visit o, template.nodes }
      else
        sub_visit object, template.nodes
      end
    ensure
      @_locals = {}
    end
265321
def render(self, template, **data):
        
        if(type(template) != str):
            raise TypeError("String expected")
        
        env = Environment(
            loader=FileSystemLoader(os.getcwd() + '/View'),
            autoescape=select_autoescape()
        )

        template = env.get_template(template)
        return self.finish(template.render(data))
564986
def render(self, template, context_stack, delimiters=None):
        
        parsed_template = parse(template, delimiters)

        return parsed_template.render(self, context_stack)
1161495
function renderTemplate(impl, targetFile){
	var stappoImpl = fs.readFileSync(impl, "utf8");
	return gulp.src([targetFile])
		.pipe(replace('/*__stappo_impl__*/', stappoImpl));
}
720598
def render_body(context, options)
      if options.key?(:partial)
        [render_partial(context, options)]
      else
        StreamingTemplateRenderer.new(@lookup_context).render(context, options)
      end
    end
840682
async function _renderContent(uriPath) {
  const pathAnalyzer = new services.UriPathAnalyzer(uriPath, this.paths.www);
  const [file, pathSection, pathRecordId] = pathAnalyzer.perform();
  const content = {};

  if (!file) {
    throw Boom.notFound('Template not found');
  }

  const partials = glob.sync(resolve(this.paths.www, '**/_*.html'));
  const template = Template.fromFile(file, this.paths.www, partials, { parseConditionals: true });
  const tree = template.parse();

  /* eslint-disable no-restricted-syntax */
  for (const [token, args] of Object.entries(tree)) {
    const recordId = pathSection === args.name ? pathRecordId : null;
    /* eslint-disable-next-line no-await-in-loop */
    let recordContent = await Section.contentFor(args, recordId);

    if (this.config.placeholders) {
      recordContent = _addPlaceholders(recordContent, args);
    }

    content[token] = recordContent;
  }
  /* eslint-enable no-restricted-syntax */

  return template.render(content);
}
1007207
def render_partial(file_name)
      # The "default" version of the partial.
      file_to_render = "#{@input_folder}/partials/#{file_name.to_s}.haml"
      if @scope
        # Look for a partial prefixed with the current "scope" (which is just the name of the
        # primary template being rendered).
        scope_file = "#{@input_folder}/partials/#{@scope.to_s}_#{file_name.to_s}.haml"
        # Use it if it's there.
        file_to_render = scope_file if File.exists? scope_file
      end
      # If we found a matching partial (either the scoped one or the default), render it now.
      if File.exists? file_to_render
        partial = Haml::Engine.new(File.read(file_to_render), @options)
        partial.render self
      else
        nil
      end
    rescue Exception => e
      raise $!, "#{$!} PARTIAL::#{file_name} ", $!.backtrace
    end
406671
function template(source, target) {
  source = source || {};
  target = target || {};
  for(var z in source) {
    target[z] = $.partial(source[z]);
  }
  return target;
}
289546
function render(template, data, block) {
  data = Benchpress.addGlobals(data || {});

  return Promise.try(() => {
    Benchpress.cache[template] = Benchpress.cache[template] || load(template);
    return Benchpress.cache[template];
  }).then((templateFunction) => {
    if (block) {
      templateFunction = templateFunction.blocks && templateFunction.blocks[block];
    }
    if (!templateFunction) {
      return '';
    }

    return runtime(Benchpress.helpers, data, templateFunction);
  });
}
1020004
function(name, context, partials) {
        name = this.trim(name);
        if(!partials || partials[name] === undefined) {
          throw({message: "unknown_partial '" + name + "'"});
        }
        if(typeof(context[name]) != "object") {
          return this.render(partials[name], context, partials, true);
        }
        return this.render(partials[name], context[name], partials, true);
      }
534838
def render(self, template_name, __data=None, **kw):
        ''''''
        return self.template.render(template_name,
                                    **self._vars(__data, **kw))
1158496
def render_to_template(self):
        
        context_data = self.get_context_data()
        template = self.get_template()

        context_data['current_template'] = template.template.name
        return template.render(context_data)
47843
def render_context(self, context, *args, **kwargs):
        
        if getattr(context, '_with_template', None) is None:
            context._set_with_template(self)
        runtime._render_context(self,
                                self.callable_,
                                context,
                                *args,
                                **kwargs)
1119818
def _render(self, contexts, partials):
        """"""
        val = self._lookup(self.value, contexts)
        if val:
            return EMPTYSTRING
        return self._render_children(contexts, partials)