Yeah, this solution totally works! Here are a few reasons I prefer using Embeds over this:
Embeds are more readable: It's easier to read the {% block %} syntax within an embed than it is to see one (or multiple) statements setting HTML to a variable, and then passing those variables into a Macro.
The syntax for outputting the blocks of content (within the embed declaration, is cleaner with embeds. This is especially true if you want to set defaults.
There may be other reasons, but these are the ones that come to mind.
All of that said, the way you're doing it isn't "wrong" and I'm glad you found a way to accomplish what you needed to!
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hey René!
Yeah, this solution totally works! Here are a few reasons I prefer using Embeds over this:
{% block %}
syntax within an embed than it is to see one (or multiple) statements setting HTML to a variable, and then passing those variables into a Macro.There may be other reasons, but these are the ones that come to mind.
All of that said, the way you're doing it isn't "wrong" and I'm glad you found a way to accomplish what you needed to!