mirror of
https://github.com/Jermolene/TiddlyWiki5
synced 2024-11-19 08:14:50 +00:00
Allow template overrides for the story
This commit is contained in:
parent
52f9e495ae
commit
b9e5171da6
@ -43,6 +43,8 @@ exports.info = {
|
|||||||
history: {byName: "default", type: "tiddler"},
|
history: {byName: "default", type: "tiddler"},
|
||||||
viewTemplateMappings: {byName: true, type: "filter"},
|
viewTemplateMappings: {byName: true, type: "filter"},
|
||||||
editTemplateMappings: {byName: true, type: "filter"},
|
editTemplateMappings: {byName: true, type: "filter"},
|
||||||
|
viewTemplate: {byName: true, type: "tiddler"},
|
||||||
|
editTemplate: {byName: true, type: "tiddler"},
|
||||||
storyviewTiddler: {byName: true, type: "tiddler"},
|
storyviewTiddler: {byName: true, type: "tiddler"},
|
||||||
storyview: {byName: true, type: "text"}
|
storyview: {byName: true, type: "text"}
|
||||||
}
|
}
|
||||||
@ -96,11 +98,19 @@ exports.getTemplate = function(title,mappingFilter) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
exports.getViewTemplate = function(title) {
|
exports.getViewTemplate = function(title) {
|
||||||
|
if(this.hasParameter("viewTemplate")) {
|
||||||
|
return this.params.viewTemplate;
|
||||||
|
} else {
|
||||||
return this.getTemplate(title,this.params.viewTemplateMappings || "[tag[$:/tag/view-template-mapping]]");
|
return this.getTemplate(title,this.params.viewTemplateMappings || "[tag[$:/tag/view-template-mapping]]");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
exports.getEditTemplate = function(title) {
|
exports.getEditTemplate = function(title) {
|
||||||
|
if(this.hasParameter("editTemplate")) {
|
||||||
|
return this.params.editTemplate;
|
||||||
|
} else {
|
||||||
return this.getTemplate(title,this.params.editTemplateMappings || "[tag[$:/tag/edit-template-mapping]]");
|
return this.getTemplate(title,this.params.editTemplateMappings || "[tag[$:/tag/edit-template-mapping]]");
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user