periodicjs.core.controllerhelper
Advanced tools
Comparing version 1.0.2 to 1.0.3
@@ -24,3 +24,3 @@ /* | ||
var logger,appSettings; | ||
var logger,appSettings,theme; | ||
@@ -30,2 +30,3 @@ var ControllerHelper = function (resources) { | ||
appSettings = resources.settings; | ||
theme = resources.settings.theme; | ||
}; | ||
@@ -35,10 +36,9 @@ | ||
var extname = options.extname || '', | ||
themename = options.themename, | ||
theme = options.theme, | ||
themename = theme, | ||
viewname = options.viewname, | ||
themefileext = options.themefileext, | ||
// themetemplatefile = options.themetemplatefile, | ||
// exttemplatefile = options.exttemplatefile, | ||
themetemplatefile = path.join(path.resolve(process.cwd(), './content/themes'), themename, 'views', viewname + '.' + themefileext), | ||
exttemplatefile = path.join(path.resolve(process.cwd(), './node_modules', extname), 'views', viewname + '.' + themefileext); | ||
themetemplatefile, | ||
exttemplatefile; | ||
themetemplatefile = (themename && themefileext) ? path.join(path.resolve(process.cwd(), './content/themes'), themename, 'views', viewname + '.' + themefileext) : false; | ||
exttemplatefile = (extname && themefileext) ? path.join(path.resolve(process.cwd(), './node_modules', extname), 'views', viewname + '.' + themefileext) : false; | ||
@@ -57,3 +57,3 @@ var getExtensionView = function (viewname, callback) { | ||
else { | ||
callback(null, viewname, viewname); | ||
callback('no extname', viewname, viewname); | ||
} | ||
@@ -74,3 +74,3 @@ }; | ||
else { | ||
callback(null, viewname, viewname); | ||
callback('no theme', viewname, viewname); | ||
} | ||
@@ -77,0 +77,0 @@ }; |
{ | ||
"name": "periodicjs.core.controllerhelper", | ||
"description": "Customizable CMS platform", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"main": "index.js", | ||
@@ -6,0 +6,0 @@ "engines": { |
17194