Ftl Renderer =========== @param tpl    - freemarker template name, without .ftl @param data   - data model
778836
function ftlRender(res) {
    return function(tpl, data) {
        res.set('Content-Type', 'text/html');
        res.render(tpl + '.ftl', data);
    };
}
1176791
function template(tmpl, data) {
  // Grab the template engine
  var engine = settings['template engine'];

  // Process the template through the template engine
  var content = engine.call(this, tmpl, data);

  // Return the content
  return content;
}
1218088
function (tpl, option) {
            var code = compiler.compile(tpl);
            option = option || {};
            // eval is not ok for eval("(function(){})") ie
            return (Function.apply(null, []
                .concat(code.params)
                .concat(code.source.join('\n') + '//@ sourceURL=' +
                    (option.name ? option.name : ('xtemplate' + (xtemplateId++))) + '.js')));
        }
1290717
public static void checkDepthOnlyRenderableTexture2D(
    final JCGLTextureFormat t)
    throws JCGLExceptionFormatError
  {
    if (!isDepthRenderable(t)) {
      final String m =
        String.format("Format %s is not depth-renderable", t);
      assert m != null;
      throw new JCGLExceptionFormatError(m);
    }

    if (isStencilRenderable(t)) {
      final String m = String.format(
        "Format %s is stencil-renderable: Must be used as a depth+stencil "
          + "attachment",
        t);
      assert m != null;
      throw new JCGLExceptionFormatError(m);
    }
  }
507151
private void render(List<T> data) {
        List<Widget> widgets = new ArrayList<>();
        for (T model : data) {
            Widget widget = renderer.render(model);
            widget.getElement().setId("item-" + itemCount);
            add(widget);
            widgets.add(widget);
            itemCount++;
        }

        // Check if recycling is enabled
        if (isEnableRecycling()) {
            recycleManager.recycleWidgets(widgets);
        }

        // Will force the scroll panel to have a scroll if it isn't visible
        if (!hasScrollBar()) {
            int height = $(widgets.get(0).getElement()).outerHeight();
            getElement().getStyle().setHeight(height, Style.Unit.PX);
        }
    }
1133134
public function render($tpl, array $data = [], $status = null)
    {
        $this->vitex->render($tpl, $data, $status);
    }
834746
private void writeBottom(boolean hasNext) throws IOException {
        String template = Template.readResourceAsStream("com/btaz/util/templates/html-table-footer.ftl");
        Map<String,Object> map = new HashMap<String,Object>();
        String prev = " ";
        String next = "";
        if(currentPageNumber > 1) {
            prev = "<a href=\"" + createFilename(1) + "\">First</a> &nbsp; "
            + "<a href=\"" + createFilename(currentPageNumber-1) + "\">Previous</a> &nbsp; ";
        }
        if(hasNext) {
            next = "<a href=\"" + createFilename(currentPageNumber+1) + "\">Next</a>";
        }
        map.put("pageNavigation", prev + next);
        template = Template.transform(template, map);
        writer.write(template);
        writer.close();
        writer = null;
    }
418672
protected function renderTpl($tpl, $data = array())
    {
        if (!empty($tpl)) {
            extract($data);
            ob_start();
            eval('?>'.$tpl.'<?php ');
            $tpl = ob_get_clean();
        }

        return $tpl;
    }
1206467
public function render($tpl,  $tpl_vars = null) {
        $tpl_vars && $this->assign($tpl_vars);
        return $this->_process($tpl);
    }
1241614
def render_line
      if @type == :thead
        return content_tag(:tr, Tools::html_safe(@cells.collect { |cell| cell.render_cell_thead }.join), @html_options)
      elsif @type == :tfoot
        return content_tag(:tr, Tools::html_safe(@cells.collect { |cell| cell.render_cell_tfoot }.join), @html_options)
      else
        content_tag(:tr, Tools::html_safe(@cells.collect { |cell| cell.render_cell_tbody }.join), @html_options.merge(:class => "#{@html_options[:class]} #{@@template.cycle(:odd, :even)}".strip))
      end
    end
84277
public function renderTemplate($tpl, array $render) {
    $registry = new \Drutiny\Registry();
    $loader = new \Twig_Loader_Filesystem($registry->templateDirs());
    $twig = new \Twig_Environment($loader, array(
      'cache' => sys_get_temp_dir() . '/drutiny/cache',
      'auto_reload' => TRUE,
      // 'debug' => true,
    ));
    // $twig->addExtension(new \Twig_Extension_Debug());

    // Filter to sort arrays by a property.
    $twig->addFilter(new \Twig_SimpleFilter('psort', function (array $array, array $args = []) {
        $property = reset($args);

        usort($array, function ($a, $b) use ($property) {
          if ($a[$property] == $b[$property]) {
            return 0;
          }
          $index = [$a[$property], $b[$property]];
          sort($index);
          return $index[0] == $a[$property] ? 1 : -1;
        });

        return $array;
    },
    ['is_variadic' => true]));

    $template = $twig->load($tpl . '.' . $this->getFormat() . '.twig');
    $contents = $template->render($render);
    return $contents;
  }
1315457
private String getViewContent(final Map<String, Object> dataModel) {
        if (null == configuration) {
            initTemplateEngineCfg();
        }

        try {
            final Template template = configuration.getTemplate("plugin.ftl");
            final StringWriter sw = new StringWriter();

            template.process(dataModel, sw);

            return sw.toString();
        } catch (final Exception e) {
            // This plugin has no view

            return "";
        }
    }
513142
function XTemplate(tpl, config) {
  var tplType = (typeof tpl);
  if (tplType !== 'string' && tplType !== 'function') {
    config = tpl;
    tpl = undefined;
  }
  config = this.config = util.merge(XTemplate.globalConfig, config);
  if (tplType === 'string') {
    try {
      tpl = this.compile(tpl, config.name);
    } catch (err) {
      this.compileError = err;
    }
  }
  XTemplateRuntime.call(this, tpl, config);
}
727842
protected function render($tpl = null, array $data = []) {
        if ($this instanceof Controller) {
            if (is_array($tpl)) {
                $data = $tpl;
                $tpl  = null;
            }
            $layout = '~' . $this->layout;
            $data   = $this->onInitLayoutData($data);
            if ($tpl && $tpl{0} == '~') {
                $tpl = substr($tpl, 1);
                $tpl = $this->realPath($tpl . '.tpl');
            } else if ($tpl) {
                $path = str_replace(['\\', 'controllers'], [DS, 'views'], $this->reflectionObj->getNamespaceName());
                $tpl  = $this->realPath($path . DS . $tpl . '.tpl');
            } else {
                $path = str_replace(['\\', 'controllers'], [DS, 'views'], $this->reflectionObj->getNamespaceName());
                $tpl  = $this->realPath($path . DS . $this->ctrName . DS . $this->action . '.tpl');
            }
            $data['workspaceView'] = $tpl;
            $view                  = view($layout, $data);

            return $view;
        }

        return null;
    }
967250
public void render(Template template, Writer out, GlobalScope... extraGlobalScopes) throws IOException {
    newInterpreter(extraGlobalScopes).process((TemplateImpl) template, out);
  }
439940
protected function display($tpl, $data = [], $auto_set_tpl_dir = true)
    {
        if ($auto_set_tpl_dir) {
            $dir = substr(get_called_class(), 4);
            $dir = str_replace(['Controllers', 'Controller'], '', $dir);
            $dir = str_replace('\\', '/', $dir);
            $dir = str_replace('//', '/', $dir);
            $dir = strtolower(trim($dir, '/'));
            return $this->response->tpl($dir . '/' . $tpl, $data);
        } else {
            return $this->response->tpl($tpl, $data);
        }

    }
836328
function getNewDefaultRenderer(map) {
        switch (map.orientation) {
            case "orthogonal":
                return new me.TMXOrthogonalRenderer(map);

            case "isometric":
                return new me.TMXIsometricRenderer(map);

            case "hexagonal":
                return new me.TMXHexagonalRenderer(map);

            case "staggered":
                return new me.TMXStaggeredRenderer(map);

            // if none found, throw an exception
            default:
                throw new Error(map.orientation + " type TMX Tile Map not supported!");
        }
    }