Closed robwhite4 closed 8 years ago
Dust provides sufficient conditionals (via built-in helpers) to do what you wanna do..
---
hello: world
---
{@eq key=hello value="world"}
Hello World
{:else}
Hello Mars
{/eq}
omg you're right! Haha. I totally forgot about the 'out-of-the-box' dust helpers.
Thanks :+1:
@vmadman ,
So, I'm having an issue that requires various scopes of report output depending on the intended audience of that report.
I'm wondering what the best possible solution to that concern would be. Currently, I have to maintain separate copies of a document in order to satisfy this requirement.
I wonder if it would be possible to create a {@sanitize /} helper to wrap content in that would remove it from html / pdf output based on some white-matter trigger, like
sanitize: true
.If this seems like something that would be useful / possible, I wonder if we could then extend so we could pass items in via white-matter in order to create conditions for what will display and what will not.
Something like:
I don't know how it might work, or even if this solution is a really dumb one. Just thought I'd put it here so we can discuss it at some point.
Rob