Skip to content

Commit

Permalink
refactor: abe_meta.template = selectTemplate
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaslabbe committed Dec 15, 2016
1 parent 91d86ac commit 9c98de6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions src/cli/cms/Page.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@ export default class Page {
// I compile the text
var compiledTemplate = Handlebars.compile(cmsTemplates.insertDebugtoolUtilities(this.template, this._onlyHTML))

console.log('* * * * * * * * * * * * * * * * * * * * * * * * * * * * *')
console.log('this.template', this.template)

// I create the html page ! yeah !!!
this.html = compiledTemplate(json, {data: {intl: config.intlData}})
}
Expand Down
6 changes: 5 additions & 1 deletion src/server/controllers/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,11 @@ function addToForm(match, text, json, util, arrayBlock, keyArray = null, i = 0)
// }else
if(util.dontHaveKey(obj.key) && cmsData.regex.isSingleAbe(v, text)) {
realKey = obj.key//.replace(/\./g, '-')
obj.value = json[getDataIdWithNoSlash(realKey)]
try {
obj.value = eval(`json.${getDataIdWithNoSlash(realKey)}`)
}catch(e) {
obj.value = null
}
json[getDataIdWithNoSlash(obj.key)] = add(obj, json, text, util)
}
}
Expand Down

0 comments on commit 9c98de6

Please sign in to comment.