Using Advanced Queries and views to output complex blocks

Hi!

I’m trying to use Advanced Queries to format the results of a query using the view (which I believe uses the Hiccup library) - but I’m trying to get it to output a complex block, which isn’t just html.

For example, there’s a Mermaid plugin available on the marketplace - and ideally, I’d like to be able to use an Advanced Query to find blocks/pages matching some query, and then build a Mermaid diagram from it; the Mermaid plugin uses 2 blocks for its output, one with a “render” button, and the other which is the Mermaid diagram source (wrapped in 3 backticks)

Is it possible to use :view to output more complicated blocks than just html?

Specific example of the Mermaid diagram I’d like to build from the results of an Advanced Query mermaid Editor

timeline
    something
       : item1
       : item2
    another
       : item3
1 Like

Welcome.

What does this mean? Both blocks and queries are rendered as html.

Thanks for the response; from the examples of using :view I’ve seen, it’s only for outputting “normal” html elements - but I was wondering if it’s possible to inject blocks through view - i.e. before they get rendered to html.

i.e. insert whatever it needs, before it gets processed by an extension

I too wish it was possible to do that - generate a Mermaid graph based on a query result (ideally interactively, so that editing the visual data also affects the source).

I don’t understand the conversation here though - goes way over my head. So just following in silence!

:view outputs html. Blocks are processed during the previous step, which is :result-transform