I am basically trying to do the same thing as here, but where instead of grabbing individual lines under the heading, it grabs and renders the whole header section as Markdown? The solution in the linked topic also isn’t able to grab text from subheadings under the grabbed linked heading.
I have just thrown in the links as I sometimes link headers to ideas and don’t have any preference for one specific header level when it comes to this. What I want is to, for example, grab all the text under the ## [[Science]] header section (so not including Topic 1 or 2) for all my Daily Notes and render it as Markdown in the “Science” note.
Also found this resource. Best method I’ve found so far is to use the Text Expand plugin, combined with Templater, though that’s slightly hacky because a) the view isn’t autoupdating and b) I can’t seem to specify a directory for the text search. Ideally if anyone has a better understanding of Dataview or DataviewJS then a script would be an ideal solution. I am not 100% familiar with Javascript or Regex so a quick script rundown would be very much appreciated.
And the result of that is a list of the headings with text list a few times since the first included the other two:
one
one_one
one_two
one_one
one_two
Is this matching what you’re experiencing?
Depending on the answer of that we need to do some other matching and pairing of stuff, and possibly iterate on the app.metadataCache.getFileCache() of a file having outlinks to the linked heading you’re looking for. By the way, will the header (with subheaders) you want to include always be a link? Or could it be just text too?