Hi,

I wrote here yesterday about problems with the cms utilities tag simplesearch. 
digging deeper into it I realized that to achieve what I want I need to write a 
model class. I created a model class in groovy. First I tried with the 
QueryManager. my code on pastebin: [url]http://pastebin.com/3MDeKc6j[/url] 

It works fine but it is quite hard to create more complicated queries. 
So I decided to try using the criteria module. my new code looks like this : 
[url]http://pastebin.com/pr47eVmN[/url]
this works fine. It returns a SimpleSequence to freemarker however I can not 
access some properties. I can access the image & its location, title, abstract, 
author etc but I can not access the UUID. the freemarker code to create a link:
[code][#assign itemLink = mgnl.createLink(item)!][/code] 
works only for QueryManager but not for the Criteria result. 
The problem probably is that I'm adding AdvancedResultItem into the 
Collection<Content> .  if I call it.uuid from freemarker it doesn't work. if I 
add it.getUUID() I'll get a sequence of uuid's but nothing else. There is 
something crucial I'm probably missing but sadly I'm not a very good programmer 
and I'm slowly resolving to "shotgun" programming. If you can point me in the 
right direction I would be glad. Thanks

-- 
Context is everything: 
http://forum.magnolia-cms.com/forum/thread.html?threadId=a599fdf1-7144-4d60-bc8c-043e93ff9340


----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to