Below is a walk-through that gives you
• a simple, maintain-once template you can apply to every top-level (main) tag
• two views inside that template – one for the sub-tags, one for the resources – that are automatically filtered to “this tag” and sorted
It assumes you already have a Tags database that references itself (Parent relation) and a Resources database that relates to Tags.
───────────────────────────────────────────────────
① Add the helper properties you’ll need
───────────────────────────────────────────────────
Tags database
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Name – title
Parent – relation → Tags (self-reference)
Main Tag – formula (or roll-up) that bubbles the tag up to its top-level parent
if(
empty(prop("Parent")),
prop("Name"), /* already a main tag */
prop("Parent").name /* parent’s name = the main tag */
)
Sort Key – formula (helps you sort later):
prop("Main Tag") + " – " + prop("Name")
Resources database
‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾
Tags – relation → Tags
Main Tag – roll-up → Tags → Main Tag, “Show unique” (makes one value)
Sub-Tag – roll-up → Tags → Name, “Show unique” (gives you the tag names)
Now you can sort any Resources view by
- Main Tag (roll-up)
- Sub-Tag (roll-up)
- Name (resource title)
───────────────────────────────────────────────────
② Build one template for Main Tag pages
───────────────────────────────────────────────────
- Open the Tags database, click the arrow next to “New” → + New template.
- Name it “Main Tag page” (or whatever you like).
Inside the blank template add two linked-database views:
A. Sub-tags view
• /linked → choose the Tags database
• Filter → Parent Contains “Current page” (Notion will show “Current page” as soon as you pick the relation)
• Sort → Name Ascending
B. Resources view
• /linked → choose the Resources database
• Filter →
‑ Tags.Main Tag Contains “Current page” (this catches resources tagged with this main tag or with any of its sub-tags)
• Sorts →
1) Main Tag (roll-up) Ascending
2) Sub-Tag (roll-up) Ascending
3) Name Ascending
• Optional: Group by Main Tag and then by Sub-Tag if you prefer groups over sorting.
- Style the rest of the page however you want (icon, header, instructions etc.)
- Click “Close” – the template is saved.
───────────────────────────────────────────────────
③ Use it
───────────────────────────────────────────────────
Whenever you create a tag that is not a sub-tag (i.e. Parent is empty), hit the arrow on “New” in the Tags database and pick “Main Tag page”.
• The “Sub-tags” block will instantly list just the children of that tag.
• The “Resources” block will instantly show every resource linked to the tag itself or to one of its children, sorted first by main tag (handy if a resource carries several main tags) and then alphabetically by the sub-tags.
───────────────────────────────────────────────────
Tips & gotchas
───────────────────────────────────────────────────
• Dynamic “Current page” filters only show up in New Database engine. Convert old tables via ︙ → “Turn into new database” if you don’t see the option.
• Notion sorts roll-ups alphabetically based on the final string. If a resource has multiple sub-tags the roll-up shows them comma-separated; the first in that string is what Notion sorts on. If you need more granular control, add a “Primary Tag” single-relation inside Resources.
• You can Sync the two linked-database blocks so every main-tag page stays identical even if you tweak the layout later.
That’s it—every top-level tag page will now auto-display the right resources, perfectly ordered by main tag and then by sub-tag alphabetical order. Happy tagging! 🎉