The SPA Rendering Extended module allows you to edit content served from external sources. In a nutshell, you can write your content 100% independently from Magnolia while still getting the full WYSIWYG experience for your editors. So if you aim for server-side rendering with Angular, Vue, or React or think about using static site generators with Netlify then this module is the solution.
Maven is the easiest way to install the module. Add the following dependency to your bundle:
The module adds another rendering option for templates.
To use the SPA Rendering Extended module define your page template as follows:
Page Properties Dialog
If you want to use the same page definition for different websites, for example, different heads in dev stage and production, you can override the
templateScript in the page properties by defining the following field in the page dialog:
Required steps in SPA app:
- Ensure that resources links are full URLs e.g. https://mgnl.io/js/index.js
- Ensure correct reading of the path for the page to be fetched from Magnolia. The URL inside Magnolia's preview would have the site node name prefix and .html suffix, e.g. /nodeName/page1.html. Below is an example of reading the correct pathname:
You can find a useful library here.
- This module is at INCUBATOR level.
- Version 6.2 - Initial release of the module.