Bases - Add current `# section` as dynamic filter for View

Use case or problem

I’m currently playing with dynamic Base views, i.e., views that I can embed within a note and where the note title is used as dynamic filter. My use case for now is that I have a Base with YouTube videos tagged by channel and by video topics, and my dynamic views allow me to have smart selections on a per-note basis using these dynamic filters:

note["my-text-property"] == this   # for text properties
note["my-list-property"].contains(this.file.basename)  # for list properties

I am currently thinking about how these dynamic views could expand for MOC sections. A use case would be a contacts list with a Contacts.md note that would look like this

Contacts.md

# Family
![[Contacts Base.base#per-category]]

# Friends
![[Contacts Base.base#per-category]]

# Colleagues
![[Contacts Base.base#per-category]]

using a filter like this:

note["contact-category"] == this.getcurrentsection()

Proposed solution

Make `this` aware of its location inside a note.

Current workaround (optional)

Create a duplicate view for each section.