Could be based off of this: Code Snippets and https://documentation.magnolia-cms.com/display/DOCS56/Developing+a+custom+content+editor+app
We'll be using the FreeMarker directive
continue
, so we need to update the version of FreeMarker that came with Magnolia (2.3.25 - you could find it in your WEB-INF/lib). Add the following to your webapp pom:Now we need a content app for managing something, call them 'offers'.
Add 3 offers using your new Offers app.
Make sure for 'Country', you use 'cn' and 'gb'. This is for later testing in the exercise.
Now we'll need to create a component to display the offers, a page for that component to live on, and some styling:
Create an Offers Page, and add to it an OffersList Component:
- Try it out! http://localhost:8080/offers-test-1.html?previewCountry=gb and http://localhost:8080/offers-test-1.html?previewCountry=cn and test out the links. Notice how we have here personalization without making any page variants. We did it all through FreeMarker.
1 Comment
Bradley Andersen
You could also now use the delivery endpoint and fetch this block and put it somewhere else.