Skip to content

Commit

Permalink
enhancement: An Abe type 'import' can now be an absolute path (you ju…
Browse files Browse the repository at this point in the history
…st have to make it start with '/'
  • Loading branch information
gregorybesson committed Jun 15, 2017
1 parent b6256ac commit b69fad3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/cli/cms/templates/template.js
Expand Up @@ -110,9 +110,13 @@ export function includePartials(text, json) {

var file = obj.file
var partial = ''
file = path.join(Manager.instance.pathPartials, file)
if(file.charAt(0) == '/'){
file = path.join(config.root, file)
} else {
file = path.join(Manager.instance.pathPartials, file)
}

file = cmsData.attributes.getValueFromAttribute(file, json)

if(Object.prototype.toString.call(file) === '[object Array]' ) {
Array.prototype.forEach.call(file, (f) => {
if(coreUtils.file.exist(f)) {
Expand Down

0 comments on commit b69fad3

Please sign in to comment.