How to associate MetadataMenu to my files

I have two problems:

Adding fields to the class

When I add a new field to the class it is always inserted at the top, but I usually want it added last.

How do I add the new fields automatically at the end of the others?

Associate class with files

I know that there is the possibility of automatic association by path or tag but I need to associate the class in the frontmatter. I am sure i read that it is possible to do this but unfortunately i don’t remember where. Something similar to

---
class: MyProject
---

It just doesn’t work that way. Not even after restarting Obsidian! :face_with_symbols_over_mouth:

I need to define a class to be able to use more fields, especially file references, which are not available without Metadata.
However, I also need to define paragraph headings in the body of the text, and for that I use Templater.
So my idea was to create a template that would associate the class in the frontmatter in addition to everything else in the text.
This also allows me to have the associated class written in the file itself, and not have the association hidden.

I would also like there to be a way to automatically add the class fields in the frontmatter when the file is created without having to replicate them in the template.
In the same order as I defined them in the class.

1 Like

For the first question, I don’t know a solution either.
For your second question, I didn’t quite understand, but to associate a file with a fileclass, you have to use the fileclass property and not class, like this:

---
fileClass: MyProject
---

I try

---
fileClass: MyProject
---

but the MyProject class is not associated with that file: it does not open the class icon and is not listed in the class panel in the table view.

Have I forgotten something?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.