1

Is it possible to retrieve data from a separate page? I only know how to use contentModel.VARIABLENAME in my ftl templates.

For example, I am currently in Page A but the data I want to display is from Page B.

1 Answers1

2

You can use the siteItemService:

<#assign pageB = siteItemService.getSiteItem("/site/website/path/to/pageB/index.xml") />

You just need to replace path/to/pageB for the page path as shown in the Sidebar. The object returned is of the exact same type as contentModel, so you can do siteItemService.VARIABLENAME

Alfonso Vasquez
  • 598
  • 3
  • 10