Dynamic bullet lists referencing Master Note with other Notes (Alternative to query blocks)

Hey all,

I am looking to make a “master inventory list” note with 2 other notes labelled “car” and “moving van”. No fancy headers or anything, just simple bullet lists where I specify for each item which “sub-list note” it should also appear in (car vs. moving van).

Right now I am trying query blocks with hashtags, but the formatting car and movingVan looks really tacky

Example:

  • Refrigerator #MovingVan
  • Computer monitor #Car

If you have used this type of solution before, it’s not ideal for sharing with other family members helping with the move.

Does anyone have a suggestion to create Dynamic bulleted notes where there’s no tacky query block formatting?

Here are some CSS snippets that (I think) improve the embedded search formatting:

/*Style embedded search text like body text instead of small and faint. 

Courtesy of sailkite: https://discord.com/channels/686053708261228577/702656734631821413/1141541070686134392 */

.internal-query .search-result-file-matches {
    color: var(--text-normal);
    font-size: var(--font-text-size);
}
/*De emphasize the search terms at top of embedded searches by giving them the default style of results.

Courtesy of sailkite: https://discord.com/channels/686053708261228577/702656734631821413/1141542427069521920 */

.internal-query .internal-query-header-title {
    color: var(--text-muted);
    font-size: var(--font-ui-smaller);
}
/*Remove match highlighting from embedded search.
Courtesy of trainbuffer: https://discord.com/channels/686053708261228577/702656734631821413/1141532971136983160
"And you could remove the `.internal-query` bit if you'd like to change the sidebar Search/Backlinks/etc. matched text as well. A `unset` could work here for no color"
*/

.internal-query .search-result-file-matched-text {
background-color: unset; /*default: var(--text-highlight-bg);*/
}
/*Allow full height of embedded searches instead of limiting to a scrolling box.

Courtesy of sailKite: https://discord.com/channels/686053708261228577/702656734631821413/1141539855969550437 */

.internal-query .search-result-container {
    max-height: unset;
}
1 Like

This ended up being the solution that replicated what I was trying to convey/accomplish

```dataviewjs

const currentFilePath = dv.current().file.path;
const pages = dv.pages();
let linesWithTag = "";

for (let page of pages) {
    if (page.file.path === currentFilePath) continue;

    const fileContent = await dv.io.load(page.file.path);
    for (let line of fileContent.split("\n")) {
        if (line.includes("#MovingVan")) {
            let cleanedLine = line.replace("#MovingVan", "").trim();
            linesWithTag += cleanedLine + "\n"; 
        }
    }
}

dv.paragraph(linesWithTag);

Thanks for the CSS snippet options @CawlinTeffid, @I.X.I in discord for the dataview solution provided above, and @trainbuffer in discord for “Query Control Plugin” as an option for GUI-based toggles for cleaning up the query-style blocks. :slight_smile:

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