Search code examples
umbracoumbraco7umbraco-mvcumbraco-macros

Umbraco 7 Macro Rendering


Im using Umbraco 7 for an Intranet. I was hoping to replicate some functionality that is in the backend, ive noticed when it renders the macro in the backend it will load the macro after / during the full page load.

I was hoping to replicated that same functionality in the front end, so that it can load the full page quickly then render the macros as and when theyve fully rendered

Has anyone else done anything like this before?

Thanks Ian


Solution

  • The reason it works like that in the back end of Umbraco is that the Macros are stored as custom markup in the RichText editor. There's some JS that looks for the code and then parses the macro details and loads in a representation of the markup into the editor.

    If you want to copy the functionality of the back office, have a look at the source code for Umbraco and see if you can use the method that they use.