tera
tera copied to clipboard
Including a macro only once.
I have a bunch of macros that generate various components and each have their own "CSS macro" with their styles. I want to be able to use the component macros multiple times, but only include the corresponding CSS macro once. Is there a way to conditionally render macro content based on some global state that can be set the first time a macro runs; or some other way of only including a macro once (other than explicitly including them separately in the template)?
No way to do that, macros are pure functions