Closed ComLock closed 6 years ago
I would like to avoid writing the same code twice. Aka part and macro.
The code above is not working correctly because the fragmentUrl includes html head and body...
Is there a componentUrl for fragments?
This is not a good solution. I.e. fragments may be layouts, and contain a lot of depending CSS styling. If you want "reusable" content inside a macro, you have to create it as a separate content, not as a fragment.
Also, think what will happen when you have macros inside the fragments again. !
The code below basically makes it possible to embed any part into an HtmlArea in Content. But is does not work perfectly.
I feel like the concept of part and macro are very similar. If there was built-in functionality to use parts inside HtmlAreas, there might not be much need for macros...