Hi.
Well, we can “want” many things (“I want a house in front of the sea…”) but that’s not always be possible.
Dataview works with “metadata” in .md files, not the full content. For now, headers/sections aren’t readable data (but it’s on the way).
When this be possible, I doubt it will feasible specify the list elements after the header…
If you want this type of results, you may need to restructure the way you put the elements in your notes: they need to be associated a some “field” readable as “metadata”.
For example, are these “hyperlinked titles” outlinks to other notes? Are the only outlinks in the note? If yes, they are implicit fields, i.e., metadata for dataview…
Without any key to capture any value you can’t have a list under a specific header.
The relation key: <value> is the core of dataview.
For example, use this js query (you need to active js in dataview settings):
`$=dv.span(dv.current())`
This gives all the metadata you can work with.
If you use the trick of “tasks”, you can get that. More, with tasks you can get all indented list elements related with the tasks (before or after), i.e.
- [ ] my links
- link 1
- link 2
- link 3
or
- something
- [ ] my task
- link
With a task query you can get all the list elements directly related with the task.
# My note
This is my note with some text.
## Research
- [ ] [link 1](http...)
- [ ] [link 2](http...)
- an indent list element (a bullet point is a list element)
- another list element nested and with a [link 3](http...)
- [link 4](http...)
- [link 2](http...)
## My query
Now let's try a dataview query for tasks with the filter for section(header) "Research"
```dataview
TASK
WHERE contains(string(section), "Research")
```
note about this query: section is a link… to filter that link without adding the path I transform the link in a string and search the words “Research” on it… this means that all sections (headers) with that word are included → to avoid unwanted headers, you need to use a very specific title or add another filters to limit the source (tags, folder, etc.)
Hi @walkinverse . This kind of query is impossible with Dataview because it can’t see the text content of pages, only things like metadata, fields, and tasks.
If I understand your use case, you have lists of links in many different notes that you would like to collect into one place so that you can read them. This sounds like a kind of task list to me. If you made the URLs into tasks, e.g.:
key:: value - a full inline field: the key at the start of the line and all the string in same line is the value;
[key:: value] - using brackets and placing the field in any place (one or more fields in same lime)
(key:: value) - the same of previous type > the difference is in the way how this inline fields are highlighting in preview mode (this last type with round brackets, when in preview mode hides “key::”, showing only the “value”) - go to Settings > Dataview (in Plugin options) and enable “Inline Field Highlighting”.
With this method you can create this simple query:
## Research
### Query for all fields with "key=rlink" per file
```dataview
LIST rlink
WHERE rlink
```
### Query for all fields with "key=rlink" (without file link)
```dataview
LIST WITHOUT ID rlink
WHERE rlink
```