Replies: 1 comment 2 replies
-
|
Hi @pureume! I'm Dosu and I’m helping the Trilium team. Unfortunately, there's no built-in way to conditionally promote attributes or hide empty ones in Trilium currently. This is actually one of the most-requested improvements — users report that long lists of empty promoted attributes consume excessive screen space, especially on mobile. Here's what's available: Built-in option: You can add Workaround with scripting: You can create a custom toggle button using a frontend script to show/hide the entire promoted attributes widget, but this only affects visibility, not which attributes appear. Upcoming improvement: Collapsible promoted attributes are planned for an upcoming version, which will let you collapse/expand the section to reduce visual clutter. For your template design, your intuition about multiple templates is actually the recommended approach — only include promoted attributes that most inheriting notes will actually use. You can also use a base template pattern: create a general "Entity" template with common attributes, then have specialized templates (Author, Family, etc.) extend it with domain-specific attributes via Re-declaring attributes in individual notes shouldn't cause performance issues, but it does add management overhead as you noted. To reply, just mention @dosu. How did I do? Good | Irrelevant | Incorrect | Verbose | Hallucination | Report 🐛 | Other |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi folks, I am somewhat new to Trillium and am currently exploring its functionality to see how I might be able to adopt it.
Currently, I am trying to figure out if there is a way to hide empty attributes, or, alternatively, promote them conditionally (such as only on notes that have a particular label) when these are declared in a template the note inherits. I can think of two ways to achieve this currently:
Use multiple templates: For example, a Person template for all people, Author template for authors, Family template for family members, etc. This is somewhat cumbersome and tedious, and doesn't really solve the problem because there will always be scenarios where a note may inherit relation declarations but does not have relevant values for those attributes (so they are promoted but empty).
Promote attributes manually: in templates, the declared relations will be set to not promoted, and then on an individual basis you can re-declare the relation as promoted within individual notes. This is also error-prone and tedious. I am also not sure if there would be some kind of performance penalty for re-declaring attributes in every note.
There may be a robust way to achieve this, but I am still somewhat new and unfamiliar. Thanks in advance for your insight!
Beta Was this translation helpful? Give feedback.
All reactions