tries to find a partial in the curent scope and render it
199575
function(name, context, partials, indent) {
      var partial = partials[name];

      if (!partial) {
        return '';
      }

      if (this.c && typeof partial == 'string') {
        partial = this.c.compile(partial, this.options);
      }

      return partial.ri(context, partials, indent);
    }
988757
function do_render(name, user_context, callback) {
		if(_debug) console.log("[dustfs] [" + name + "] Waiting until directory loading is done before rendering...");
		wait_loading(function(err) {
			if(err) console.log("[dustfs] " + err);
			if(_debug) console.log("[dustfs] [" + name + "] Loading done! Let's render!");
			var context = do_create_context(user_context),
			    dir;
			if(!_compiled[name]) {
				dir = search_dir(name);
				if(!dir) {
					callback("Could not find template: "+name);
					return;
				}
				do_load(dir+"/"+name, name);
			}
			if(_debug) console.log("[dustfs] ["+name+"] Rendering template...");
			dust.render(name, context, callback);
		});
	}
1083842
public function partial( $partial, $child = '', $context = [] ) {
		if ( is_array( $child ) ) {
			// Optional argument $child not specified, flip input around.
			$context = $child;
			$child = '';
		}

		$templates = [];

		if ( $child ) {
			$templates[] = "partials/${partial}-${child}.php";
		}

		$templates[] = "partials/${partial}.php";

		app_render( $templates, $context );
	}
374116
function resolvePartials(template) {

        var keys = {};
        if (template.partials) {    // Hogan 3
            var p = template.partials;
            Object.keys(p).forEach(function(i) {
                keys[ p[i].name ] = 1;
            });
        } else if (template.text) { // Hogan < 3
            Hogan.scan(template.text, hoganOptions.delimiters).forEach(function(token) {
                if (token.tag === '>') {
                    keys[ token.n ] = 1;
                }
            });
        }

        Object.keys(keys).forEach(function(key) {
            if (key in partials) return;

            if (typeof options.partials === 'object' && key in options.partials) {
                template = options.partials[key];
            } else if (typeof settings.partials === 'object' && key in settings.partials) {
                template = settings.partials[key];
            } else {
                var path = view.lookup(key + view.ext);
                template = fs.existsSync(path) ?
                    fcompile(path, hoganOptions, options.cache) : null;
            }

            if (template) {

                if (template instanceof Hogan.Template) {
                } else {
                    // FYI, Hogan.compile does its own caching
                    template = Hogan.compile(template, hoganOptions);
                }

                partials[key] = template;
                resolvePartials(template);
            } else {
                partials[key] = template;
            }
        });
    }
923840
def render(self, context, db=None, safe_mode=False, extra_context=None):
        """"""
        if not db:
            raise MissingParameterError(
                "db",
                context=self.error_context
            )
        rendered_views = dict()
        path_instances = db.query(self.path.query, safe_mode=safe_mode)
        extra_ctx = copy(extra_context) if extra_context else dict()

        for inst in path_instances:
            extra_ctx.update({
                self.path.variable: inst
            })
            ctx = context.build(
                db=db,
                safe_mode=safe_mode,
                for_each_inst=inst,
                extra=extra_ctx
            )
            inst_path = self.path.render(inst=inst, context=ctx)
            rendered_view = self.template.render(ctx)
            rendered_views = deep_merge_dict(
                rendered_views,
                dict_from_path(inst_path, final_value=rendered_view)
            )
        return rendered_views
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
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
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
544063
function partial (fn) {
    var args = Array.prototype.slice.call(arguments, 1)
    return function () {
      var arg = 0
      for (var i = 0; i < args.length && arg < arguments.length; i++) {
        if (args[i] === undefined) args[i] = arguments[arg++]
      }
      return fn.apply(this, args)
    }
  }
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 ''
97087
function checkOnScopeChangeVals(partial, partialName) {
    var remodelOnScopeChange = partial.remodelOnScopeChange || (partial.remodel && partial.remodel.onScopeChange);
    var rerenderOnScopeChange = partial.rerenderOnScopeChange || (partial.rerender && partial.rerender.onScopeChange);
    var scope = partial.scope || {};

    _.each(remodelOnScopeChange, function (scopeVal) {
        var idx = scopeVal.indexOf('.');
        var val = idx > 0 ? scopeVal.substring(0, idx) : scopeVal;
        if (!scope[val]) {
            throw new Error(partialName + ' remodelOnScope value \'' + scopeVal + '\' is not defined in the scope definition.');
        }
    });

    _.each(rerenderOnScopeChange, function (scopeVal) {
        var idx = scopeVal.indexOf('.');
        var val = idx > 0 ? scopeVal.substring(0, idx) : scopeVal;
        if (!scope[val]) {
            throw new Error(partialName + ' rerenderOnScopeChange value \'' + scopeVal + '\' is not defined in the scope definition.');
        }
    });
}
39375
def render_full(self, evalex=False, secret=None, evalex_trusted=True):
        """"""
        exc = escape(self.exception)
        return PAGE_HTML % {
            "evalex": "true" if evalex else "false",
            "evalex_trusted": "true" if evalex_trusted else "false",
            "console": "false",
            "title": exc,
            "exception": exc,
            "exception_type": escape(self.exception_type),
            "summary": self.render_summary(include_title=False),
            "plaintext": escape(self.plaintext),
            "plaintext_cs": re.sub("-{2,}", "-", self.plaintext),
            "traceback_id": self.id,
            "secret": secret,
        }
1362216
public function renderPartial($partialName, $sectionName, array $variables)
    {
        if (!isset($this->partialIdentifierCache[$partialName])) {
            $this->partialIdentifierCache[$partialName] = $this->getPartialIdentifier($partialName);
        }
        $partialIdentifier = $this->partialIdentifierCache[$partialName];

        if ($this->templateCompiler->has($partialIdentifier)) {
            $parsedPartial = $this->templateCompiler->get($partialIdentifier);
        } else {
            $this->templateParser->setConfiguration($this->buildParserConfiguration());
            $parsedPartial = $this->templateParser->parse($this->getPartialSource($partialName));
            if ($parsedPartial->isCompilable()) {
                $this->templateCompiler->store($partialIdentifier, $parsedPartial);
            }
        }

        /** @var $variableContainer TemplateVariableContainer **/
        $variableContainer = $this->objectManager->get(\TYPO3\Fluid\Core\ViewHelper\TemplateVariableContainer::class, $variables);
        $renderingContext = clone $this->getCurrentRenderingContext();
        $renderingContext->injectTemplateVariableContainer($variableContainer);

        $this->startRendering(self::RENDERING_PARTIAL, $parsedPartial, $renderingContext);
        if ($sectionName !== null) {
            $output = $this->renderSection($sectionName, $variables);
        } else {
            $output = $parsedPartial->render($renderingContext);
        }
        $this->stopRendering();

        return $output;
    }
1258853
def evaluate(scope, locals, &block)
      if @engine.respond_to?(:precompiled_method_return_value, true)
        super(scope, locals, &block)
      else
        @engine.render(scope, locals, &block)
      end
    end
26503
function loadPartials(template, templatePath) {
    var templateDir = path.dirname(templatePath)

    var partialRegexp = new RegExp(
      escapeRegex(mustache.tags[0]) +
        '>\\s*(\\S+)\\s*' +
        escapeRegex(mustache.tags[1]),
      'g'
    )

    var partialMatch
    while ((partialMatch = partialRegexp.exec(template))) {
      var partialName = partialMatch[1]

      if (!partials[partialName]) {
        try {
          var partialPath = null
          var partial = null

          // ignore `partial` with file extension.
          // e.g.
          //   1, `{{> ./path/to/partial.html }}`
          //   2, `{{> ./path/to/partial. }}`
          if (path.extname(partialName) !== '') {
            partialPath = path.resolve(templateDir, partialName)
            partial = fs.readFileSync(partialPath, 'utf8')
          } else {
            // ignore `partial` file is exists without file extension.
            // e.g.
            //   1, `{{> ./path/to/partial }}` is exists.
            //   2, `{{> ./path/to/.partial }}` is exists.
            partialPath = path.resolve(templateDir, partialName)

            if (fs.existsSync(partialPath)) {
              partial = fs.readFileSync(partialPath, 'utf8')
            } else {
              // or check if `partial + options.extension` is exists.
              // e.g.
              //   if `options.extension` equals ".html":
              //   the `{{> ./path/to/partial }}` will load
              //   `./path/to/partial.html`.
              if (typeof options.extension === 'string') {
                partialPath = path.resolve(
                  templateDir,
                  partialName + options.extension
                )

                if (fs.existsSync(partialPath)) {
                  partial = fs.readFileSync(partialPath, 'utf8')
                }
              }

              // when `options.extension` is not a string or
              // `partialName + options.extension` does not exists.
              // try use `.mustache` extension to load `partial` file.
              if (partial === null) {
                partialPath = path.resolve(
                  templateDir,
                  partialName + '.mustache'
                )

                partial = fs.readFileSync(partialPath, 'utf8')
              }
            }
          }

          partials[partialName] = partial
          loadPartials.call(this, partial, partialPath)
        } catch (ex) {
          this.emit(
            'error',
            new PluginError(
              'gulp-mustache',
              // use `ex.message` property instead of `partialPath`,
              // because `this.emit()` seems not a sync method.
              // also the `ex.message` property provide more details
              // about error information.
              'Unable to load partial file: ' + ex.message
            )
          )
        }
      }
    }
  }
1169860
def find_templates(name, prefix, partial, details, key=nil, locals=[])
      return [] if @@resolver_options[:only] && !@@resolver_options[:only].include?(prefix)

      path = build_path(name, prefix)
      conditions = {
        :path    => path,
        :locale  => [normalize_array(details[:locale]).first, nil],
        :format  => normalize_array(details[:formats]),
        :handler => normalize_array(details[:handlers]),
        :partial => partial || false
      }.merge(details[:additional_criteria].presence || {})

      @@model.find_model_templates(conditions).map do |record|
        Rails.logger.debug "Rendering template from database: #{path} (#{record.format})"
        initialize_template(record)
      end
    end
792053
function render(template, locals, layoutTemplates, cb) {
    if (!layoutTemplates) layoutTemplates = [];

    // We'll render templates from bottom to top of the stack, each template
    // being passed the rendered string of the previous ones as `body`
    var i = layoutTemplates.length - 1;

    var _stackRenderer = function(err, htmlStr) {
      if (err) return cb(err);

      if (i >= 0) {
        locals.body = htmlStr;
        renderTemplate(layoutTemplates[i--], locals, _stackRenderer);
      } else {
        cb(null, htmlStr);
      }
    };

    // Start the rendering with the innermost page template
    renderTemplate(template, locals, _stackRenderer);
  }