Virtual Footer

by Signynt
5
4
3
2
1
Score: 53/100

Description

The Virtual Footer plugin allows you to append dynamic markdown content-such as dataview queries-to the bottom of all notes within a specified folder, without modifying the actual file content. This virtual rendering approach keeps your notes clean and avoids repetitive code blocks while enabling consistent display across related notes. You can define custom rules for each folder, making it ideal for cases like automatically adding summary tables or linked content below author profiles or project notes.

Reviews

No reviews yet.

Stats

79
stars
8,617
downloads
8
forks
409
days
7
days
7
days
6
total PRs
0
open PRs
0
closed PRs
6
merged PRs
58
total issues
11
open issues
47
closed issues
12
commits

Latest Version

7 days ago

Changelog

  • Pass file.path to dv.query for more complete Dataview support (#63), thanks to @garrett-is-a-swann

README file from

Github

Virtual Content

Previously known as "Virtual Footer"

Set rules to add markdown text to files based on rules. This text gets rendered normally, including dataview blocks or Obsidian Bases. Your notes don't get modified or changed, the given markdown text is simply rendered "virtually". Rules can be defined based on folders, tags or properties. The content to be included can be entered directly in the plugin settings, or come from a file in your vault.

This is especially useful if you have many files with the same dataview block. Instead of pasting the dataview codeblock into every note, you can simply add it with this plugin. This prevents unecessary file bloat, while also letting you easily change the code for all files at the same time.

Features

  • Works with Dataview, Datacore and native Obisidan Bases
  • Lets you define rules using folderes, tags and properties
    • Rules can be set to include or exclude subfolders and subtags (recursive matching)
    • Multi-condition rules are possible, allowing you to define multiple conditions for one rule (using AND/OR)
    • Dataview rules can be used to create complex conditions
  • Lets you select wether the "virtual content" gets added as a footer (end of file), a header (below properties) or in the sidebar
    • Lets you choose if all sidebar "virtual content" gets added to the same sidebar tab, or if it should be shown in it's own tab
  • Supports virtual content at the top or bottom of sections (defined using headings)
  • Allows for "virtual content" to be defined in the plugin settings, or in a markdown file
  • Rules can be enabled or disabled from the plugin settings

Example use cases

Universally defined dataview for showing authors works

I have a folder called "Authors" which contains a note on each author of media I've read/watched. I want to see what media the Author has made when I open the note, so I use the following dataview query to query that info from my media notes:

#### Made
```dataview
TABLE without ID
file.link AS "Name"
FROM "References/Media Thoughts"
WHERE contains(creator, this.file.link)
SORT file.link DESC
```

Instead of having to add this to each file, I can simply add a rule to the folder "Authors" which contains the above text, and it will be automatically shown in each file. I can do this with as many folders as I like.

virtual-footer-screenshot

virtual-content-screenshot-settings

image

Some users use Virtual Content to sort their backlinks based on folder or tag.

Displaying tags used in a file

Other users use Virtual Content at the top of a file to show tags used in the body of their notes. Check out this issue for examples!

I use this dataviewjs to display notes which were created, modified on that day or reference my daily note.

image

```dataviewjs
const currentDate = dv.current().file.name; // Get the current journal note's date (YYYY-MM-DD)

// Helper function to extract the date part (YYYY-MM-DD) from a datetime string as a plain string
const extractDate = (datetime) => {
    if (!datetime) return "No date";
    if (typeof datetime === "string") {
        return datetime.split("T")[0]; // Split at "T" to extract the date
    }
    return "Invalid format"; // Fallback if not a string
};

const thoughts = dv.pages('"Thoughts"')
    .where(p => {
        const createdDate = p.created ? extractDate(String(p.created)) : null;
        const modifiedDate = p.modified ? extractDate(String(p.modified)) : null;
        return createdDate === currentDate || modifiedDate === currentDate;
    });

const wiki = dv.pages('"Wiki"')
    .where(p => {
        const createdDate = p.created ? extractDate(String(p.created)) : null;
        const modifiedDate = p.modified ? extractDate(String(p.modified)) : null;
        return createdDate === currentDate || modifiedDate === currentDate;
    });

const literatureNotes = dv.pages('"References/Literature"')
    .where(p => {
        const createdDate = p.created ? extractDate(String(p.created)) : null;
        const modifiedDate = p.modified ? extractDate(String(p.modified)) : null;
        return createdDate === currentDate || modifiedDate === currentDate;
    });

const mediaThoughts = dv.pages('"References/Media"')
    .where(p => {
        // Check only for files that explicitly link to the daily note
        const linksToCurrent = p.file.outlinks && p.file.outlinks.some(link => link.path === dv.current().file.path);
        return linksToCurrent;
    });

const mediaWatched = dv.pages('"References/Media"')
    .where(p => {
        const startedDate = p.started ? extractDate(String(p.started)) : null;
        const finishedDate = p.finished ? extractDate(String(p.finished)) : null;
        return startedDate === currentDate || finishedDate === currentDate;
    });

const relatedFiles = [...thoughts, ...mediaThoughts, ...mediaWatched, ...wiki, ...literatureNotes];

if (relatedFiles.length > 0) {
    dv.el("div", 
        `> [!related]+\n` + 
        relatedFiles.map(p => `> - ${p.file.link}`).join("\n")
    );
} else {
    dv.el("div", `> [!related]+\n> - No related files found.`);
}
```

Displaying dataview in the sidebar

You can also use Virtual Content to display dataview (or anything else) in the sidebar. This is useful if you want to see the results of a dataview query without having to scroll to the bottom of the file. Just select the "Sidebar" option in the settings, and use the "Open virtual content in sidebar" command.

Untitled

Applying complex rules using Dataview

You can use Dataview queries to create complex rules. For example, you can create a rule that applies to all notes in a specific folder, but only if they begin with a certain prefix. It is recommended to use the Dataview option for very complex rules, as it allows for more flexibility and power than the built-in multi-condition rules.

Example dataview rules:

LIST FROM "References/Authors" WHERE startswith(file.name, "Test") OR startswith(file.name, "Example")
LIST FROM "Tasks/Reports" WHERE (Tags = work AND status = "done") OR progress > 50

Showing virtual content in an expandable pop up

Check out this issue to see how a user turned the virtual content into a pop up which displays when you hover over it!

https://github.com/user-attachments/assets/2125c038-9298-4c8b-9072-d40888882635

.daily-note .virtual-footer-dynamic-content-element.virtual-footer-header-group.virtual-footer-header-rendered-content{
    position: absolute;
    opacity: 0.3;
    width: 800px !important;
    border-radius: 12px;
    top: 300px;
    left: -750px;
    z-index: 1;
    transition: all 0.4s ease; /* 所有属性添加0.2秒渐变效果 */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    outline: 1px solid var(--background-modifier-border);

    &:hover {
        z-index: 100;
        scale: 1.0;
        opacity: 1.0;
        background-color: var(--background-secondary);
        transform: translate(756px, 0px);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        backdrop-filter: blur(10px);
    }
}

In the above snippet it's limited to .daily-note so that this style only applies to notes with cssclasses: daily-note.

Limitations

Links in the markdown text work natively when in Reading mode, however they don't in Live Preview, so I've added a workaround that gets most functionality back. This means that left click works to open the link in the current tab, and middle mouse and ctrl/cmd + left click works to open the link in a new tab. Right click currently doesn't work.

Sectional virtual content currently only supports Reading mode and does not display in Live Preview.

Support

You can send me a donation using my Paypal link. Thanks for the support!

Similar Plugins

info
• Similar plugins are suggested based on the common tags between the plugins.
AI Agent
8 months ago by Manuel Magaña López
Empower your Obsidian vault with an AI agent from the provider of your choice.
Better Inline Fields
4 years ago by David Sarman
Obsidian plugin to enhance Dataview style inline fields
Bulk Exporter
3 years ago by symunona
Bulk export Markdown filtered, renamed and sorted by front matter metadata into a new structure.
Charts View
5 years ago by caronchen
Data visualization solution in Obsidian, support plots and graphs.
CSV All-in-One
a year ago by hihangeol
Current View
a year ago by Lucas Ostmann
Automatically set the view mode (Reading, Live Preview, Source) for notes in Obsidian using folder rules, file patterns, or frontmatter.
DataCards
a year ago by Sophokles187
Obsidian Plugin that transforms dataview tables into visually appealing and customizable card layouts.
Dataview
5 years ago by Michael Brenan
A data index and query language over Markdown files, for https://obsidian.md/.
Dataview Autocompletion
a year ago by Daniel Bauer
Dataview Publisher
2 years ago by UD
Output markdown from your Dataview queries and keep them up to date. You can also be able to publish them.
Dataview Serializer
2 years ago by Sébastien Dubois
Obsidian plugin that gives you the power of Dataview, but generates Markdown, making it compatible with Obsidian Publish, and making the links appear on the Graph.
Date Range Expander
a year ago by Mil
Obsidian plugin - Date Range Expander
Double Colon Conceal
3 years ago by Michal Srch
Obsidian plugin to display double colon (i.e. Dataview inline fields) as a single colon for more natural reading experience.
EasyLink
a year ago by isitwho
Select text in your obsidian editor to find the most similar content from other notes and easily create links.
Every Day Calendar
a year ago by QuBe
Obsidian plugin to create calendars inspired by Simone Giertz's Every Day Calendar
Feeds
3 years ago by LukeMT, pashashocky, madx
Magic feeds dataview query for obsidian
Habit Calendar
3 years ago by Hedonihilist
Monthly Habit Calendar for DataviewJS. This plugin helps you render a calendar inside DataviewJS code block, showing your habit status within a month.
Habit Tracker
4 years ago by David Moeller
A Plugin to display a Habit Tracker in Obsidian.
HackerOne
3 years ago by neolex
A plugin to get our hackerone reports data into obsidian
Heatmap Calendar
4 years ago by Richard Slettevoll
An Obsidian plugin for displaying data in a calendar similar to the github activity calendar
Images to Notes
a year ago by Rodolfo Terriquez
Turn photos of your handwritten notes into markdown
Kanban Status Updater
a year ago by Ankit Kapur
Obsidian plugin that automatically updates the note property when card is moved to a column.
Link Tree
3 years ago by Joshua Tazman Reinier
A sidebar foldable list of Obsidian link hierarchies.
Meld Build
3 years ago by meld-cp
Write and execute (sandboxed) JavaScript to render templates, query DataView and create dynamic notes.
MOC Link Helper
2 years ago by Bogdan Codreanu
This obsidian plugins allows you to quickly see which notes you need to include in your MOC.
Move Cursor On Startup
9 months ago by Jared Kelnhofer
Obsidian plugin to move the cursor to the right and back to the left when starting up. Why? To keep DataView expressions from not running on the first load of, say, your Home file.
moviegrabber
3 years ago by Leon Holtmeier
obsidian.md plugin to grab data from public movie Databases and make them into a note that can be used with dataview querries
Pug Templates
2 years ago by Nicholas Wilcox
An Obsidian plugin that enables the usage of Pug templates.
Reason
2 years ago by Joshua Pham
Digest your Obsidian notes
Release Timeline
4 years ago by cakechaser
Run
3 years ago by Hananoshika Yomaru
Generate markdown from dataview query and javascript.
Simple Note Review
4 years ago by dartungar
Simple, customizable plugin for easy note review, resurfacing & repetition in Obsidian.md.
Slash snippets
a year ago by echo-saurav
Insert snippet of text with slash command
Table to CSV Exporter
4 years ago by Stefan Wolfrum
An Obsidian Plugin that allows to export tables from a pane in reading mode to CSV files.
Tasks Map
9 months ago by NicoKNL
A graph view of your tasks.
Template by Note Name
2 years ago by Jacob Learned
A simple Obsidian plugin to automatically template notes based on their title
Tier List
a year ago by Mox Alehin
Obsidian plugin for visual ranking and organizing content into customizable Tier Lists.
TikToker
3 months ago by ameyxd
Save TikTok videos as markdown notes with embedded content and metadata extraction.
TimeStamper
4 years ago by Martin Eder
A plugin for Obsidian to quickly insert customized date- and time-stamps to the currently active note
View Count
2 years ago by Trey Wallis
Add view count tracking to your Obsidian vault