Trigger action on link (generated by dataview) to manipulate page

Things I have tried

Searched both DataView documentation and Obsidian reference.
Have tried integrating the button plugin into markdown.

What I’m trying to do

The button plugin has the ability to replace lines when a button is clicked. This works really nicely for me. However, I have a dynamic set of buttons I would like to generate, based on my content. Basically, I have a query against my vault, group them by something and would like to generate something that can trigger such an action when clicked. This way, I don’t have to manually create tens of buttons or keep them updated when my content changes.

I have a simple dataview query that creates the right content, and I generate it using dataviewjs. I can output html for my content, but that html cannot utilize the button plugin.

I’m either looking to generate such a view, pushing the button plugin into the html, or simply building an triggering link myself. Both I’m not sure how to approach, would appreciate any thoughts or directions from the group.

Would this solve your problem Using metaedit, buttons, templater, nldtase and dataview together ?
You can configure the button to do whatever you want

I don’t know if this is related, but there is also a new functionality introduced by metadata menu plugin which makes the dataview cells interactive using different types of properties (last part of the video) metadatamenu - 015 - field settings and dataview controls - YouTube

Excellent. With your suggestion I was succesful. It took a lot to find the api for the button that I wanted to create. I ended up putting a breakpoint in the button that I wanted to find the properties that had to be passed into the function. Thank you!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.