Return setting template with typePage: public, admin_sweeto or back_office
173381
public static function getModuleInfo($module=null, $parent=null)
	{
		define('DS', DIRECTORY_SEPARATOR);
		if($module != null) {
			$modulePath = Yii::getPathOfAlias('application.modules.'.$module);
			$moduleFile = $module.'.yaml';
			if($parent != null) {
				$modulePath = Yii::getPathOfAlias('application.modules.'.$parent);
				$module = $parent.'-'.$module;
				$moduleFile = $module.'.yaml';
			}
			$YMLPath = $modulePath.'/'.$moduleFile;

			if(!file_exists($YMLPath)) {
				$modulePath = Yii::getPathOfAlias('ommu.'.$module);
				if($parent != null) {
					$modulePath = Yii::getPathOfAlias('ommu.'.$parent);
				}
				$YMLPath = $modulePath.'/'.$moduleFile;
			}
			
		} else
			$YMLPath = Yii::getPathOfAlias('application.libraries.core').DS.'core.yaml';
			
		if(file_exists($YMLPath)) {
			$moduleInfo = self::getArrayFromYML($YMLPath);
			
			return $moduleInfo;
			
		} else
			return false;
	}
736040
def _list_templates(settings):
    
    for idx, option in enumerate(settings.config.get("project_templates"), start=1):
        puts("  {0!s:5} {1!s:36}".format(
            colored.yellow("[{0}]".format(idx)),
            colored.cyan(option.get("name"))
        ))
        if option.get("url"):
            puts("      {0}\n".format(option.get("url")))
285822
def get_template_loader(app, subdir='templates'):
    '''
    
    '''
    dmp = apps.get_app_config('django_mako_plus')
    return dmp.engine.get_template_loader(app, subdir, create=True)
378454
static function designSetting( $type = 'standard' )
    {
        if ( $type != 'standard' and
             $type != 'site' )
        {
            eZDebug::writeWarning( "Cannot retrieve designsetting for type '$type'", __METHOD__ );
            return null;
        }
        if ( $type == 'site' )
        {
            if ( !empty( $GLOBALS['eZSiteBasics']['site-design-override'] ) )
            {
                return $GLOBALS['eZSiteBasics']['site-design-override'];
            }
        }
        if ( isset( $GLOBALS['eZTemplateDesignSetting'][$type] ) )
        {
            return $GLOBALS['eZTemplateDesignSetting'][$type];
        }
        $ini = eZINI::instance();
        if ( $type == 'standard' )
        {
            $GLOBALS['eZTemplateDesignSetting'][$type] = $ini->variable( "DesignSettings", "StandardDesign" );
        }
        else if ( $type == 'site' )
        {
            $GLOBALS['eZTemplateDesignSetting'][$type] = $ini->variable( "DesignSettings", "SiteDesign" );
        }
        return $GLOBALS['eZTemplateDesignSetting'][$type];
    }
1235739
def format_template(template, content):
    """"""

    import pystache
    result = u""
    if True:  # try:
        result = pystache.render(template, content, string_encoding='utf-8')
    # except (ValueError, KeyError) as e:
    #    print("Templating error: %s %s" % (e, type(e)))

    # pprint(result)
    return result
1279143
function docTemplate(page) {
    return page.doclayout ||
      (page.notemplate && 'none') ||
      (page.nolayout && page.template) ||
      (generator.template$['doc-layout'] && 'doc-layout') ||
      layoutTemplate(page);
  }
518342
def get_email_template(name, language=''):
    
    use_cache = getattr(settings, 'POST_OFFICE_CACHE', True)
    if use_cache:
        use_cache = getattr(settings, 'POST_OFFICE_TEMPLATE_CACHE', True)
    if not use_cache:
        return EmailTemplate.objects.get(name=name, language=language)
    else:
        composite_name = '%s:%s' % (name, language)
        email_template = cache.get(composite_name)
        if email_template is not None:
            return email_template
        else:
            email_template = EmailTemplate.objects.get(name=name,
                                                       language=language)
            cache.set(composite_name, email_template)
            return email_template
589685
public function getTemplateBase($admin = false)
    {
        // Base template dir is the parent dir of template dir
        return str_replace($this->_sTemplateDir . '/', '', $this->getDir(null, $this->_sTemplateDir, $admin, null, null, null, false));
    }
251418
def template(path, source, type = :template)
      if source
        template = Template.new(source, @context, source_path: path)
      else
        template_path = case type
                        when :partial
                          find_partial(path)
                        when :layout
                          find_layout(path)
                        else
                          path
                        end

        if template_path && File.exist?(template_path)
          template = Template.open(template_path, @context)
        else
          template_not_found!(type, path)
        end
      end

      prevent_recursion!(template)

      template
    end
900670
def get_template(template):
    """"""
    with open(os.path.join(template_dir, template) + template_ext, "r") as template_file:
        return template_file.read()
154461
def sbatch_template(self):
        """"""
        template = self.sbatch_template_str
        if template.startswith('#!'):
            # script is embedded in YAML
            return jinja_environment.from_string(template)
        return jinja_environment.get_template(template)
1163953
public static boolean isTemplate(PageContext pc, PageSource ps, boolean defaultValue) {
	try {
	    return !(ps.loadPage(pc, false) instanceof CIPage);
	}
	catch (PageException e) {
	    SystemOut.printDate(e);
	    return defaultValue;
	}
    }
1233906
function(form, decorator, slots, lookup) {
        return build(form, decorator, function(form, field) {
          if (form.type === 'template') {
            return form.template;
          }
          return $templateCache.get(field.template);
        }, slots, undefined, undefined, lookup);

      }
1186801
String getHTMLForAdminPage(Map<String,String> params) {
        try {
            String template = m_htmlTemplates.get("admintemplate.html");
            for (Entry<String, String> e : params.entrySet()) {
                String key = e.getKey().toUpperCase();
                String value = e.getValue();
                if (key == null) continue;
                if (value == null) value = "NULL";
                template = template.replace("#" + key + "#", value);
            }
            return template;
        }
        catch (Exception e) {
            e.printStackTrace();
        }
        return "<html><body>An unrecoverable error was encountered while generating this page.</body></html>";
    }
1017586
public static function loadThemeTemplates($post_templates, $object = null, $post = null, $post_type = null)
    {
        $blades = self::getAllBlades();
        foreach ($blades as $blade) {
            if (preg_match('/{{--\s*Template Name:(.*)--}}/mi', file_get_contents($blade), $header)) {

                $post_templates[basename($blade, ".blade.php")] = $header[1];
            }
        }
        return $post_templates;
    }
720831
def get_template_request_spec(spec):
        
        dst = CreateUO.get_default_template()
        src = None
        if isinstance(spec, Configuration):
            src = spec.create_tpl
        elif isinstance(spec, dict):
            src = spec
        else:
            raise ValueError('Unrecognized spec type')

        if spec is not None:
            dst = EBUtils.merge(dst, src)

        return dst
1132030
def get_template(template_id, opts = {})
      data, _status_code, _headers = get_template_with_http_info(template_id, opts)
      data
    end