zadam / trilium

Build your personal knowledge base with Trilium Notes
GNU Affero General Public License v3.0
27.22k stars 1.9k forks source link

How to use templates + Dynamic multiple notes views #937

Open sambbaron opened 4 years ago

sambbaron commented 4 years ago

Hello, I'm new to Trilium and am very impressed. It's the closest I've found to my own PIM ideas. I'm coming from using Notion and Roam (and many other apps before that). I'm looking for that balance between structured and unstructured data using a knowledge graph.

Can someone explain how templates work? How are they created and how are they used to create instance notes? I can't figure this out from the wiki help or the demo.

Are there plans to add more dynamic views of multiple notes (tables, kanban boards, lists, etc.)? I see that the "book" note type is a step in this direction. It would seem that templates could define note "types", which could then use the attributes to build these views. This is similar to "collections" and "databases" in other apps.

Finally, as a newcomer, I'm curious about the long-term plans for Trilium. I don't see anything in the readme or wiki about this. This is a lot for one developer (which makes it all more impressive). Will it always be open-source? Are there plans to monetize?

zadam commented 4 years ago

Hello,

"template" is actually a relation between two standard notes and provides kind of out-of-tree inheritance of attributes. So you just create two ordinary notes - A and B, you decide that you will consider this note A template so you will define some attributes on the template note A and you will make B an instance of it by defining a relation named "template" pointing from B to A. As a result, all attributes defined on A will be inherited to the B.

As you mention later on, a different view on templates is that they kind of allow creation of different "type" of note.

There's another aspect of templates that content of the template note can serve as an initial content of an instance note at the point of creation.

Are there plans to add more dynamic views of multiple notes (tables, kanban boards, lists, etc.)?

Yes, this is definitely an area I want to explore, I have some plans with tables and lists (which can be generated in different ways). Not sure about the kanban boards as that sounds a) specialized and b) pretty difficult to get it right.

Will it always be open-source? Are there plans to monetize?

I have no plans to monetize the project and expect the project to go as it is now. There has been some discussions about this (#826), but these options are just not interesting for me.

sambbaron commented 4 years ago

Thank you @zadam for the quick reply and great explanation. Now I see the power of templates. You could copy and paste your response here into the wiki 😉.

I'm not sure about the template note being a "relation" of the instance note. I think this pollutes the graph with unnecessary relationships, but that's more about the graph view, not necessarily feature implementation.

Kanban boards are tricky and existing implementations out there are very limited. You typically can only use a multi-select attribute with pre-defined options. I would love to see more dynamic board options, particularly on relations, but complicated for sure.

One more helpful dynamic view would be applying a search/filter to the Link Map.

Thank you for referencing #826 .

sepwolves commented 3 years ago

I believe your first paragraph is quite important for new comers. Before I read this, I just knew the template but I didn't know how to create them. I think this should be written into the wiki.

Hello,

"template" is actually a relation between two standard notes and provides kind of out-of-tree inheritance of attributes. So you just create two ordinary notes - A and B, you decide that you will consider this note A template so you will define some attributes on the template note A and you will make B an instance of it by defining a relation named "template" pointing from B to A. As a result, all attributes defined on A will be inherited to the B.

As you mention later on, a different view on templates is that they kind of allow creation of different "type" of note.

There's another aspect of templates that content of the template note can serve as an initial content of an instance note at the point of creation.

Are there plans to add more dynamic views of multiple notes (tables, kanban boards, lists, etc.)?

Yes, this is definitely an area I want to explore, I have some plans with tables and lists (which can be generated in different ways). Not sure about the kanban boards as that sounds a) specialized and b) pretty difficult to get it right.

Will it always be open-source? Are there plans to monetize?

I have no plans to monetize the project and expect the project to go as it is now. There has been some discussions about this (#826), but these options are just not interesting for me.

NursingGT commented 2 years ago

I have been tearing my hair out on trying to get these templates working

WHERE IS A STEP BY STEP OF HOW TO MAKE THIS WORK?!

How do I get the promoted attributes?! nothing is clear on the wiki and theres no tutorial on them

AxelZvb commented 1 year ago

For those searching: The wiki is currently incorrect, there is no need to add a #template label to the template note. To set up a template you need to add a relation to a note that should use the template. ~template= An easy way of adding the relation relation GUI. The set the name to "template". And then select the template note in the target note image