Hi,

Could the model methods be replaced with a bit of groovy code? If so, where
would it live? I'd like to explore having things like the helper methods in
the model, and my ImportHandler implementation actually be managed within
the repository rather than being externally maintained.

Cheers,
Paul

 

Jan Haderka-2 wrote:
> 
> 
> Hey Paul,
> it looks fine.
> 
> <snip/> 
> 
>> [#assign provCode = content.provCode]
>> [[email protected] nodeType="Unit" repository="data" type="xpath" \
>> var="unitList"
>> query="//units/*[jcr:contains(categories/., '${provCode}')]" /]
>> [#list unitList as unit]
>> &lt;a href="/unit/${unit.unitCode}-${unit.unitYear}/&gt;
>> [/#list]
> 
> Personally I prefer to store this code in the model rather then using
> @cms.query tag in the ftl, but as long as default tag functionality is
> enough for you there's no real advantage to it.
> 
> <snip/>
> 
>> 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
> 
> <snip/>
> 
>> 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.
> 
>  The only other comment I have (tho maybe you are already aware of this)
> is: as side effect of using REST-ful URLs, those generated requests will
> be cached by Magnolia cache by default. It might be what you desire,
> just pointing it out so you know where to look if fresh data do not
> appear immediately after refresh of imported data in the data workspace.
> 
> Cheers,
> Jan
> 
> 
> ----------------------------------------------------------------
> For list details see
> http://www.magnolia-cms.com/home/community/mailing-lists.html
> To unsubscribe, E-mail to: <[email protected]>
> ----------------------------------------------------------------
> 
> 
> 

-- 
View this message in context: 
http://old.nabble.com/Critique-required-of-approach-for-integrating-external-data-tp27681387p27695398.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]>
----------------------------------------------------------------

Reply via email to