zadam / trilium

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

(Feature request) Calendar Layout as Note Template for other entry group #4510

Open theperfectwill opened 11 months ago

theperfectwill commented 11 months ago

Describe feature

The Calendar has a certain structure:

Calendar > Year > MonthNumber - MonthName > DayNumber - DayName

I would like to duplicate this behavior and basically change Calendar to something else multiple times.

Examples:

Prayer Journal > Year > MonthNumber - MonthName > DayNumber - DayName
Devotional Journal > Year > MonthNumber - MonthName > DayNumber - DayName
Marriage Journal > Year > MonthNumber - MonthName > DayNumber - DayName

etc...

So with this idea, it seems best to either allow a duplication of the Calendar structure with a customizable name (like mentioned above). Or to make it more dynamic, allow the user to create a "Note Template" with a customizable "Template Structure", allowing some dynamic variables in the template to populate when adding notes to a note that uses that template.

And last that would be needed (I think) would be an action button like the Calendar uses, where one click adds an entry to that Note Template. I mean a button like the Calendar Button in the screenshot below, which would trigger adding an entry in the desired "Note Template":

09 - Saturday - Trilium Notes-12092023-033239

Additional Information

I'm new to Trillium.

rodrigoalexandrecosta commented 11 months ago

Part of this functionality already exists but it's based on hoisted notes / workspaces: #workspaceCalendarRoot - marking a note with this label will define a new per-workspace calendar. If there's no such note, the global calendar will be used.

So that would only work if you're inside a specific workspace. I don't know if that's what you want.

Regarding the second part, which would be the button to open or automatically create the Day Note, some javascript would do the trick, I'm thinking about a script which when executed would check the workspace you're in, find the note with the label #workspaceCalendarRoot and verify if it should open or create the specific Day Note. I think that's not exactly a hard implementation but I'm not able to do it at the moment.