Hi, I am considering how to implement the integration and display of external data. I have a catalog that lives in another system, yet we want to display information from that catalog within our Magnolia website. We do not want to duplicate the catalog within the Mangolia site as pages, although we are happy to have the catalog metadata stored in the data repository and refreshed periodically. The other system can also respond with HTML fragments that gives the details of items in the catalog.
I have developed an approach (but not yet implemented much of it) and I would like advice about the various steps to ensure I am not going wrong, or making it too complicated. One of the goals we have is to get very clean REST-ful URLs. 1. Catalog metadata imported into Magnolia data repository Implemented using a DataImportHandler written in Java and deployed as a module 2. Display dynamic list of catalog items based on metadata Use a paragraph and FTL template that uses cms.query to retrieve from the data repository and builds a list of links, something like [#assign provCode = content.provCode] [[email protected] nodeType="Unit" repository="data" type="xpath" var="unitList" query="//units/*[jcr:contains(categories/., '${provCode}')]" /] [#list unitList as unit] <a href="/unit/${unit.unitCode}-${unit.unitYear}/> [/#list] 3. Use a virtual URI mapping to turn the REST-ful URL in the list of units into a query so templates and models can get parameters fromURI = ^/unit/(.*)-(.*)$ toURI = /unit/details?unitCode=$1&unitYear=$2 4. Use a single page to display any of the unit details. It will contain a paragraph with an associated model that looks at the request parameters and constructs a request to the external system and then writes the returned HTML fragment into the paragraph result. So, am I making it too complicated, or reinventing things that are already in Magnolia? Does the dynamic list using cms.query already exist? Does the paragraph that retrieves data from an external system already exist? Any advice most welcome. Cheers, Paul Fitchett -- View this message in context: http://old.nabble.com/Critique-required-of-approach-for-integrating-external-data-tp27681387p27681387.html Sent from the Magnolia - User mailing list archive at Nabble.com. ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
