Virtual Footer

by Signynt
5
4
3
2
1
Score: 51/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

72
stars
6,364
downloads
7
forks
360
days
1
days
1
days
5
total PRs
0
open PRs
0
closed PRs
5
merged PRs
52
total issues
11
open issues
41
closed issues
12
commits

Latest Version

2 days ago

Changelog

  • Add sectional virtual content (#31, #43), thanks to @NullCascade
  • Fix settings tab UI update issue, thanks to @leehan273
  • Fix Ctrl+Click and Middle-Click behavior of links (#53), thanks to @aaandreeew

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

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.
Dataview
5 years ago by Michael Brenan
A data index and query language over Markdown files, for https://obsidian.md/.
Heatmap Calendar
4 years ago by Richard Slettevoll
An Obsidian plugin for displaying data in a calendar similar to the github activity calendar
Charts View
5 years ago by caronchen
Data visualization solution in Obsidian, support plots and graphs.
TimeStamper
4 years ago by Martin Eder
A plugin for Obsidian to quickly insert customized date- and time-stamps to the currently active note
Smart ChatGPT
a year ago by 🌴 Brian
DataCards
a year ago by Sophokles187
Obsidian Plugin that transforms dataview tables into visually appealing and customizable card layouts.
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.
Page Gallery
3 years ago by Nathan Clark
Generates a gallery based on selected page contents.
Link Tree
3 years ago by Joshua Tazman Reinier
A sidebar foldable list of Obsidian link hierarchies.
Simple Note Review
4 years ago by dartungar
Simple, customizable plugin for easy note review, resurfacing & repetition in Obsidian.md.
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.
Better Inline Fields
4 years ago by David Sarman
Obsidian plugin to enhance Dataview style inline fields
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.
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.
Release Timeline
4 years ago by cakechaser
Habit Tracker
4 years ago by David Moeller
A Plugin to display a Habit Tracker in Obsidian.
Dataview (to) Properties
10 months ago by Mara-Li
Sync inline Dataview to properties (YAML frontmatter)
Tasks Map
7 months ago by NicoKNL
A graph view of your tasks.
Slash snippets
10 months ago by echo-saurav
Insert snippet of text with slash command
Query all the things
3 years ago by Sytone
Query all your data stored in Obsidian, this plugin allows SQL based queries against the data collections available in Obsidian and Dataview. Output can then be rendered by Handlebars
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
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.
AI Agent
7 months ago by Manuel Magaña López
Empower your Obsidian vault with Google Gemini.
Bulk Exporter
3 years ago by symunona
Bulk export Markdown filtered, renamed and sorted by front matter metadata into a new structure.
Kanban Status Updater
a year ago by Ankit Kapur
Obsidian plugin that automatically updates the note property when card is moved to a column.
View Count
2 years ago by Trey Wallis
Add view count tracking to your Obsidian vault
Meld Build
3 years ago by meld-cp
Write and execute (sandboxed) JavaScript to render templates, query DataView and create dynamic notes.
HackerOne
3 years ago by neolex
A plugin to get our hackerone reports data into obsidian
Run
2 years ago by Hananoshika Yomaru
Generate markdown from dataview query and javascript.
Current View
10 months ago by Lucas Ostmann
Automatically set the view mode (Reading, Live Preview, Source) for notes in Obsidian using folder rules, file patterns, or frontmatter.
Feeds
2 years ago by LukeMT, pashashocky, madx
Magic feeds dataview query for obsidian
Reason
2 years ago by Joshua Pham
Digest your Obsidian notes
Tier List
a year ago by Mox Alehin
Obsidian plugin for visual ranking and organizing content into customizable Tier Lists.
Dataview Autocompletion
a year ago by Daniel Bauer
Images to Notes
a year ago by Rodolfo Terriquez
Turn photos of your handwritten notes into markdown
CSV All-in-One
a year ago by hihangeol
EasyLink
10 months ago by isitwho
Select text in your obsidian editor to find the most similar content from other notes and easily create links.
Tagvis
a year ago by Mason Bryant
Every Day Calendar
a year ago by QuBe
Obsidian plugin to create calendars inspired by Simone Giertz's Every Day Calendar
TikToker
2 months ago by ameyxd
Save TikTok videos as markdown notes with embedded content and metadata extraction.
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.
Template by Note Name
a year ago by Jacob Learned
A simple Obsidian plugin to automatically template notes based on their title
Log Keeper
a year ago by James Sonneveld
Generates times stamps automatically as changes are made to a note.
Pug Templates
2 years ago by Nicholas Wilcox
An Obsidian plugin that enables the usage of Pug templates.
Date Range Expander
a year ago by Mil
Obsidian plugin - Date Range Expander
Move Cursor On Startup
8 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.