Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
stop #workspaceTemplate from being inherited (should have the same special behavior as #template)
zadam05231bd1c297
diff --git a/src/becca/entities/note.js b/src/becca/entities/note.jsindex e00f83364b..702f7dd7ea 100644--- a/src/becca/entities/note.js+++ b/src/becca/entities/note.js@@ -403,7 +403,7 @@ class Note extends AbstractEntity {templateAttributes.push(...templateNote.__getAttributes(newPath)// template attr is used as a marker for templates, but it's not meant to be inherited- .filter(attr => !(attr.type === 'label' && attr.name === 'template'))+ .filter(attr => !(attr.type === 'label' && (attr.name === 'template' || attr.name === 'workspacetemplate'))));}}diff --git a/src/public/app/entities/note_short.js b/src/public/app/entities/note_short.jsindex 345857758c..c83179960d 100644--- a/src/public/app/entities/note_short.js+++ b/src/public/app/entities/note_short.js@@ -267,7 +267,7 @@ class NoteShort {attrArrs.push(templateNote.__getCachedAttributes(newPath)// template attr is used as a marker for templates, but it's not meant to be inherited- .filter(attr => !(attr.type === 'label' && attr.name === 'template'))+ .filter(attr => !(attr.type === 'label' && (attr.name === 'template' || attr.name === 'workspacetemplate'))));}}diff --git a/src/services/search/expressions/attribute_exists.js b/src/services/search/expressions/attribute_exists.jsindex 8a34ee83fe..f91c19b21d 100644--- a/src/services/search/expressions/attribute_exists.js+++ b/src/services/search/expressions/attribute_exists.js@@ -28,7 +28,7 @@ class AttributeExistsExp extends Expression {}else if (note.isTemplate() &&// template attr is used as a marker for templates, but it's not meant to be inherited- !(this.attributeType === 'label' && this.attributeName === 'template')) {+ !(this.attributeType === 'label' && (this.attributeName === 'template' || this.attributeName === 'workspacetemplate'))) {resultNoteSet.addAll(note.getTemplatedNotes());}else {