-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Open
Description
It seems save.php saves it as a file, but i cant see any code to load it, but maybe im missing it,
I tested save.php (though i dont use it) and it saved a html file several levels above my webroot without name or type in the filename.
Here is my ajax code , inspired by existing builder code to load in from database/cms previously saved reusables:
$.get(loadReusablesUrl, function(response){
if(typeof response === 'object' && response !== null){
$.each(response, function(key, item){
if(item.type == 'section'){
Vvveb.Sections.add("reusable/"+item.name, {
name: item.name,
image: Vvveb.themeBaseUrl + "img/logo.png",
html: item.html
});
if (Vvveb.SectionsGroup["Reusable"] === undefined) {
Vvveb.SectionsGroup["Reusable"] = [];
}
Vvveb.SectionsGroup["Reusable"].push('reusable/'+ item.name);
Vvveb.Builder.loadSectionGroups();
}else{
Vvveb.Blocks.add("reusable/"+item.name, {
name: item.name,
image: Vvveb.themeBaseUrl + "img/logo.png",
html: item.html
});
if (Vvveb.BlocksGroup["Reusable"] === undefined) {
Vvveb.BlocksGroup["Reusable"] = [];
}
Vvveb.BlocksGroup["Reusable"].push('reusable/'+ item.name);
Vvveb.Builder.loadBlockGroups();
}
})
}
});
Metadata
Metadata
Assignees
Labels
No labels