Skip to content

Allow Bind Targets to Select Bind Targets #543

@LangyMD

Description

@LangyMD

Please fill out these Check-boxes

  • I checked for existing similar feature requests
  • I have read the docs and checked that the feature I am requesting is not already implemented
  • My feature request consists of only one feature

Is your Feature Request related to a Problem or Annoyance?

The existing approach for enabling a frontmatter/memory property to select the frontmatter/memory property a bind target selects is inefficient and complex. For instance, using the 'origin' frontmatter field to set the markdown page that a bind target connects to requires custom Javascript. This method is not straightforward and involves significant workarounds if you want to implement it inline. Additionally, the resulting field must remain visible in order to be applied, as using CSS classes to hide it does not function properly when Obsidian initially loads and the page is already open and using the hidden property on the VIEW does not hide the code block it contains.

Describe the Feature you'd like

Provide basic syntax for selecting a bind target based on an existing frontmatter/memory property. For instance, assume we have the following bind targets currently:

frontmatter^test#selected_page = Page 1
frontmatter^["Page 1"]#name = LangyMD

Then we could have something like:

frontmatter^<frontmatter^test#selected_page>#name = LangyMD

This would use the <frontmatter^test#selected_page> angle-brackets to mean "replace with the contents of this inner bind target prior to evaluation of the rest of the bind target".

Alternatives

Using Javascript to dynamically create meta bind VIEW/INPUT fields. As mentioned in the problem/annoyance description, this has limitations such as not being able to directly add it inline and needing to be visible in order for the VIEW/INPUT field to be evaluated.

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions