RoamJS / smartblocks

MIT License
23 stars 7 forks source link

Possible to output <%BLOCKMENTIONS %> Results as headings? #109

Closed harnerdesigns closed 11 months ago

harnerdesigns commented 11 months ago

Per the title, is it possible to output the results of things that get templated as headings?

If I set the template to ## {name} it directly outputs the two hashtags. If I set up the SmartBlock and the actual <%BLOCKMENTIONS %> block as a Heading it only outputs the First result as a heading:

image

- #SmartBlock Client List
    - ## <%BLOCKMENTIONS:100,client,{page}%>

image

I didn't see anything in the docs mentioning it, so I'm hopeful I missed something or there's someway to make this work.

Thanks in Advance!

mdroidian commented 11 months ago

Thank you for reporting this with such detail @harnerdesigns

I don't believe there is a current way to make this work. But I have a solution for this that will return all BLOCKMENTIONS with the same block styling as the <%BLOCKMENTIONS%> block.

EG:

- #SmartBlock Client List
    - ## <%BLOCKMENTIONS:100,client,{page}%>

Would now return each block as a header 2

Will likely review these changes tomorrow.