variables.version = "3.3"; variables.svnBuild = "172"; application.ptBlog2.version = variables.version; application.ptBlog2.svnBuild = variables.svnBuild; // Load the app config application.ptBlog2.appConfig = getAppConfig(getAppName()); validateAppConfig(); // Rebuild the Viewsfor the primary App Custom Element if requested or they don't exist buildView(ceName=getPostsCEName()); // Validate if the Auto Blog Landing Page Template is in the config if ( NOT StructKeyExists(application.ptBlog2.appConfig,"blogIndexTemplate") OR NOT LEN(application.ptBlog2.appConfig.blogIndexTemplate) ){ application.ptBlog2.appConfig.blogIndexTemplate = ""; } // Validate if the Enable Date Subsite Format is in the config if ( NOT StructKeyExists(application.ptBlog2.appConfig,"enableSubsiteDate") OR NOT LEN(application.ptBlog2.appConfig.enableSubsiteDate) ){ application.ptBlog2.appConfig.enableSubsiteDate = false; application.ptBlog2.appConfig.dateSubsiteFormat = ""; } // Validate if the PT Tags Integrated is in the config if ( NOT StructKeyExists(application.ptBlog2.appConfig,"tagsIntegrated") OR NOT LEN(application.ptBlog2.appConfig.tagsIntegrated) ){ application.ptBlog2.appConfig.tagsIntegrated = false; } // Validate if the Tags Listing Page template is in the config if ( NOT StructKeyExists(application.ptBlog2.appConfig,"tagsPageTemplate") OR NOT LEN(application.ptBlog2.appConfig.tagsPageTemplate) ){ application.ptBlog2.appConfig.tagsPageTemplate = ""; } arguments.viewName = trim(arguments.viewName); if (arguments.viewName eq "") arguments.viewName = getCEViewName(arguments.ceName); return variables.cedata.buildView ( argumentCollection=arguments, fieldTypes=getCEViewSpecs(arguments.ceName) ); var specs = structNew(); specs.defaultTextType = "shortText"; switch(arguments.ceName) { // blog case "Posts2": specs.default="shortText"; specs.longText="content,slug,tags,multimediaEmbedCode"; break; } return specs; var appConfig = getAppConfig(); // Get the configuration manager page url from the config element if ( structKeyExists(appConfig,"blogConfigurationURL") AND LEN(TRIM(appConfig.blogConfigurationURL)) ) return appConfig['blogConfigurationURL']; else return "#request.site.CP_URL#webadmin/blog/configuration/index.cfm";