What I’m trying to do
I want to transclude a specific section from one Obsidian note into another while displaying the source note’s title above the transcluded content.
For example, when given two notes with this structure:
# Daily page for 25-Feb-2025
## Daily notes
- Slept well last night
- Need to remember to pick up the milk
## Notes from National Library Meeting
- Project to begin in March
…and…
# National Library Project
![[Daily page for 25-Feb-2025#Notes from the National Library Meeting]]
…I want it to appear as:
# National Library Project
## 25-Feb-2025 – Notes from National Library Meeting
- Project to begin in March
Things I have tried
There are numerous mentions of the Forum for ways to remove the header of transcluded content, but none to add it back.
I went into Developer Tools to see if something is hidden in the page DOM, and the ![[]]
transclusion line is there, but it gets removed from the DOM when there isn’t focus on it. In fact, it shows up as a collapsed <div> in the Elements Inspector with classes cm-active
and cm-line
, but as soon as I leave focus from the Obsidian page—even to make the developer tools window active to expand the <div>, the <div> element gets yanked out! (Kind of unfortunate that it is removed from the DOM rather than just display:none
-d…I would have solved my problem.)
Use Case
I use sections with ##
header markers in my Daily Notes page to take notes on meetings that I’m in because that is the page that is most commonly opened in Obsidian. I want to pull all of those sections into a single document that has all notes for a project…that way I can find them either by remembering the day or going to the project page.
(We’ll set aside for the moment that Obsidian’s find-on-page search function doesn’t include transcluded content…that would be really handy, too!)