Include all partials when using dynamic partials
962230
public static function handleDynamic(&$context) {
        if ($context['usedFeature']['dynpartial'] == 0) {
            return;
        }

        foreach ($context['partials'] as $name => $code) {
            static::read($context, $name);
        }
    }
682165
public function renderScriptsSettings()
    {
        $this->reloadContent();

        $globalScriptsVars = array('pageScriptsHead', 'pageScriptsBodyStart', 'pageScriptsBodyEnd');
        $hooks = array();

        foreach (Finder::findFiles('@*.latte')->in(APP_DIR . '/templates') as $key => $file) {
            $filename = $file->getFileName();

            foreach ($globalScriptsVars as $key => $var) {
                if (\WebCMS\Helpers\SystemHelper::checkFileContainsStr(APP_DIR . '/templates/' . $filename, $var)) {
                    $hooks[$filename][$var] = true;
                } else {
                    $hooks[$filename][$var] = false;
                }
            }
        }

        $this->template->scriptsHooks = $hooks;
    }
754057
function specifyPartial($levelIds, $mode)
    {
        foreach ($this->schema->getLevels() as $level) {
            if (isset($levelIds[$level])) {
                continue;
            }
            if (self::INCLUDE_PARTIALS == $mode) {
                $levelIds[$level] = 0;
            } else {
                $levelIds[$level] = false;
            }
        }
        return $levelIds;
    }
694786
function preparePartials(options) {
  return Promise.all([
    registerPartials(options.src.templates, options), // Partials as partials
    registerPartials(options.src.patterns, options, 'patterns') // Patterns
  ]).then(() => options, error => DrizzleError.error(error, options.debug));
}
962543
function compile(templates) {
    templates.forEach(partial => {
      partials[partial.name] = Handlebars.compile(partial.source);
      Handlebars.registerPartial(partial.name, partials[partial.name]);
    });
  }
31311
def initialize_project
      if((Pathname.new(options[:path]) + "../partials").exist?)
        puts "[ERROR]: Don't use the \"html\" path, use the project base path instead"
        exit(1)
      end
      
      Project.new(options[:path], {:shell => self.shell}.update(options))
    end
772322
function createPartialTree (currentFile, partials, visitedFiles) {
  if (visitedFiles[currentFile.name]) {
    return {
      label: '*' + currentFile.name + '*',
      name: currentFile.name
    }
  }
  visitedFiles[currentFile.name] = true

  var result = {
    label: currentFile.name,
    name: currentFile.name,
    summary: _.trunc(chainOrUndefined(currentFile, 'apidocs', 0, 'parsed', 'description'), {
      separator: ' ',
      length: 50
    })
  }
  if (currentFile.children.length > 0) {
    _.merge(result, {
      children: currentFile.children.map(function (child) {
        return createPartialTree(partials[child], partials, visitedFiles)
      })
    })
  }
  return result
}
1357116
function initHandlebars (args) {
    // do not initialize handlebars if no template defined
    if (!defined(args.template)) {
        return
    }
    // require template string
    this.assert(typeof args.template === 'string', 111)
    // create handlebars object that will contain everything needed to
    // render template
    this.handlebars = {
        clientPartials: {},
        serverPartials: {},
        helpers: {},
    }
    // compile main template for client
    this.handlebars.clientTemplate = handlebars.precompile(args.template)
    // compile main template for server
    this.handlebars.serverTemplate = handlebars.compile(args.template)
    // compile any partials
    _.each(args.partials, (partial, name) => {
        // compile partial for client
        this.handlebars.clientPartials[name] = handlebars.precompile(partial)
        // compile partial for server
        this.handlebars.serverPartials[name] = handlebars.compile(partial)
    })
    // add any helpers
    _.each(args.helpers, (helper, name) => {
        // require helper to be function
        this.assert(typeof helper === 'function', 112)
        // add to helpers
        this.handlebars.helpers[name] = helper
    })
}
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)
    }
  }
652362
public function listMakePartial($partial, $params = [])
    {
        $contents = $this->controller->makePartial('list_'.$partial, $params + $this->vars, false);
        if (!$contents) {
            $contents = $this->makePartial($partial, $params);
        }

        return $contents;
    }
727349
function partial(data, viewname) {
  return data.replace(PARTIAL_PATTERN_RE, function (all, view) {
    view = view.match(/['"](.*)['"]/);    // get the view name
    if (!view || view[1] === viewname) {
      return "";
    } else {
      var name = view[1];
      if (settings.viewExt) {
        name += settings.viewExt;
      }
      var viewpath = path.join(settings.root, name);
      var tpl = '';
      try {
        tpl = fs.readFileSync(viewpath, 'utf8');
      } catch (e) {
        console.error("[%s][connect-render] Error: cannot load view partial %s\n%s", new Date(), viewpath, e.stack);
        return "";
      }
      return partial(tpl, view[1]);
    }
  });
}
1123832
def _make_resolve_partial(self):
        
        load_partial = self._make_load_partial()

        if self._is_missing_tags_strict():
            return load_partial
        # Otherwise, ignore missing tags.

        def resolve_partial(name):
            try:
                return load_partial(name)
            except TemplateNotFoundError:
                return u''

        return resolve_partial
1050222
def partial(file, options = {}, &block)
      engine = partial_as_engine(file, options, &block)
      engine = engine.render if engine.is_a?(Engine)
      engine
    end
673735
def partial(name)
      name = self.class.generate_template_name name, config.file_template_extension

      # return self.read_template_from_media name, media
      @_cached_partials ||= {}
      (@_cached_partials[media] ||= {})[name] ||= self.read_template_from_media name, media
    end
281220
def all_partials(str = "")
      list = []      
      @down.walk(str) { |str| list << str } unless @down.nil?
      list
    end
1119818
def _render(self, contexts, partials):
        """"""
        val = self._lookup(self.value, contexts)
        if val:
            return EMPTYSTRING
        return self._render_children(contexts, partials)
1162807
function partial(schema, defaults, options) {
  if (kindOf(schema) !== 'object') {
    if (process.env.NODE_ENV !== 'production') {
      throw new Error(
        `Partial structs must be defined as an object, but you passed: ${schema}`
      )
    } else {
      throw new Error(`Invalid schema: ${schema}`)
    }
  }

  const obj = scalar('object', undefined, options)
  const ks = []
  const properties = {}

  for (const key in schema) {
    ks.push(key)
    const s = schema[key]
    const kind = any(s, undefined, options)
    properties[key] = kind
  }

  const name = 'partial'
  const type = `{${ks.join()},...}`
  const validate = (value = resolveDefaults(defaults)) => {
    const [error] = obj.validate(value)

    if (error) {
      error.type = type
      return [error]
    }

    const errors = []
    const ret = {}

    for (const key in properties) {
      let v = value[key]
      const kind = properties[key]

      if (v === undefined) {
        const d = defaults && defaults[key]
        v = resolveDefaults(d, value)
      }

      const [e, r] = kind.validate(v, value)

      if (e) {
        const allE = e.errors || [e]
        allE.forEach(singleE => {
          singleE.path = [key].concat(singleE.path)
          singleE.data = value
          errors.push(singleE)
        })
        continue
      }

      if (key in value || r !== undefined) {
        ret[key] = r
      }
    }

    if (errors.length) {
      const first = errors[0]
      first.errors = errors
      return [first]
    }

    return [undefined, ret]
  }

  return new Kind(name, type, validate)
}