How can I make a category label as a prefix which binds to a link in Obsidian notes?

I am wondering, how to make concepts within any text more disambiguous, which are not disambiguous.


Horrible example following…
categorize the concept Ducktyping

Maybe when some one read my text and stuck on the Concept DT alias Ducktyping and knows the meaning of the concept in programming context, but he would think about another Concept with this designation Ducktyping of another category like Movement or Press. In this case Ducktyping is not disambiguous. How about to add a category as a prefix label to a concept e.g. [[Object orientated programming|OOP]] [[Ducktyping|DT]]. Then this concept would be more disambiguous.

My aim

I just what to do a small category-label abbreviation with a link as a prefix to merge the concept in full like OOP[[Ducktyping|DT]] that you could just read over OOP :-).
Personal I have a horrible memory :/. I need any help s.o. can give like this awesome App Obsidian. That’s why.

What I am trying to do

I have different options for now to solve this problem:

  1. category-label as a hashtag before a concept. e.g. #OOP
    • pro: you could search the category as a hashtag
    • pro: a marker-function already exists with hashtags
    • contra: you could probably struggle with all hashtags to find a certain hashtag which is a category.
    • contra: no further definition or expanding the abbreviation of the category-label
  2. category-label after a token as a prefix e.g. @OOP
    • pro: get rid of these hashtags
    • pro: you have a unique token for the parser
    • contra: no marker-function exists anymore
  3. category-label as a Wikilink `[[Object orientated programming|OOP]]
    • pro: you have a Wikilink therefore a marker-function
    • contra: depending on how extensive the notes are and/or the vault is, the categories will be much more.
  4. category-labels with in a Wikilink e.g. [[OOP__Ducktyping]]
    • pro: The category is merged with the concept, you never miss the category
    • contra: The category is merged with the concept. If you what to change or specify the category more, it can be very hard to find and edit all the concept in the vault.
  5. category-labels with a plugin
    • pro: You can do what you what to solve the problem
    • contra: this plugin is 1 of 10000 plugins to maintain and update

What I am doing

I just you think and work with these solutions in my mind to solve this problem.

  • category-labels in one note with invocation [[Categories#Object_orientated_programming|OOP]]
    • pro: the category-labels are central in the
    • pro: You can specify a definition or link to other vaults under the headline # Object_orientated_programming in the note
    • contra: no special highlight of a category-label. Maybe CSS Snippets could help
  • specify hashtag of category-label e.g. #_OOP or #-OOP
    • pro: you create a special type of hashtag
    • contra: no definition about the categories if you need it.
      A separate note e.g. with a definition of each category cannot link

Any advice

Any advice to solve my problem other ways would be very nice :slight_smile:

Best regards,

I usually make the note name more specific — often by adding parentheses as Wikipedia does: Ducktyping (OOP). Then if I don’t want the parentheses in the link I use link text: [[Ducktyping (OOP)|Ducktyping]] (if you do this often you can make it easier by setting an alias).

1 Like

Good idea :). You bind the category to the wikilink [[Ducktype (OOP)|Ducktype]]. The same here. But we can’t look up the definition of OOP (e.g. in our vault) if we don’t know it, for example :/.
That’s why I made for concept prefix [[Categories#Object orientated programming|OOP]]. But when I maintain and update the vault, as I always do so, I swear the connection of these two “not binded” Wikilinks [[Categories#Object orientated programming|OOP]][[Ducktyping|DT]] would sooner or later be lost :(. That’s why I ask in this forum.

I would make “Object orientated programming” its own note instead of a heading in Categories, which will allow you to give it an alias of “OOP”. The alias will make it easier to link if you do it as a link or to search if you use it as part of the note name and forget its meaning (tho if you have trouble remembering an abbreviation it may be better to just write it out in full).

Don’t forget that you’re able to have hover previews, and you can interact with those.

Meaning, if you’ve got the OOP near the top of Ducktype, you can click that through the preview window.

No need to make it harder than necessary and I believe to link those two like you’re suggesting will at least require a plugin, or for you to exchange the link syntax with some query which produces both links as you want them.

One such query option, using dataview, would need you to write something like:

`$= dv.view("myLink", "Ducktype") `

In other words, rather convoluted, and you’ll loose out on all link related features, like backlinks, graph view, and so on. Not worth it in my opinion. You’ll gain the automatic link between note and category, but you’ll loose other vital stuff in the process.

Given a custom plugin, you could perhaps link into the link generation, and keep that functionality, and add your extra link in the process. Not sure how to do it though, and not sure of the value to the general public, so I don’t see as likely to come floating by soon. :upside_down_face:

1 Like

Actually I think about [[CAT Object oriantated programming|OOP]][[OOP Ducktyping|DT]]. The one CAT Object oriantated goes into a Categories/-Folder the other one goes to Object orientated programming/-Folder.

The benefit of the solution is that…

  • the reference to a category-File as a Wikilink
  • an short alias e.g. aliases: OOPOin YAML Frontmatter
  • inside the File it could contain a link to another vault, which the title of this document explanes precisely

…as I explained. I fear that these Files within the Categories/-Folder would be tooooo many and the binding between the two links doesn’t exist :/.

I forget about that. You remind me of the page preview of Wikilinks. Thanks for that.

In frontmatter of each note, I made another key named category: [[Object orientated programming|OOP]] under tags and aliases in YAML - We all know that YAML dosn’t want this special Obsidian-syntax - so category: OOP then for now. When I hoover a Link in Read View, the preview page shows only the content of that note and not the frontmatter of it. So I can’t get to the value of the category in Frontmatter, which isn’t shown in page preview of that note. I must visit the link at first, then view the frontmatter from that note which tells me the category of that note. Very inconvenient. Then Wikilinks in YAML

Anyway thank you.

Best regards,

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