AnsweredAssumed Answered

Global Search

Question asked by jlmarques on Feb 22, 2008
Latest reply on Feb 25, 2008 by jlmarques
Hey there, I setup two web forms so that I can produce two types of content: pages and articles, they have distinct formats, but share some common properties, like title, author and body.

I am able to retrieve the results using this ftl:

<#list resultset as node>
   <#if node.isDocument>
      <li>${} - ${xmldate(}</li>

But obviosly I have no interest in getting the document properties, I want access the data inside the xml:

<#list resultset as node>
    <#if node.isDocument>
      <#assign dom=node.xmlNodeModel>
      <#if dom.article??>

I get this error:
freemarker.core.NonStringException - Error on line 5, column 39 in cms/search/search.get.html.ftl Expecting a string, date or number here, Expression is instead a freemarker.ext.dom.NodeListModel

What can I do to bypass this?

I've tried using ${(!} but still get the same error, obviously exists but it's not a string, date or number type.
I'm kind of stuck here.