AnsweredAssumed Answered

WCM Forms Guide on the WIKI

Question asked by jconnell on Jan 11, 2007
Latest reply on Jan 12, 2007 by arielb
Hey Alfresco Team,

I've been experimenting with XForms support from SVN HEAD revision (as of this morning).   I've noticed that the documentation on the wiki might be out of date.  I've started updating the wiki page at, to reflect how it currently works.  I just wanted to verify that current behavior is the intended behavior before I finish updating the page.

To give an example of one discrepency I've found, the current docs show how you can reference the Forms data in a Freemarker template.  Unfortunately, it seems that you have to use Freemarker namespaces to access the content.  I've found the following works:

Suppose your XForm produces something like the following:

<!– some namespaces excluded from example –>
<?xml version="1.0" encoding="UTF-8"?>
<cms:article xmlns:cms=""
   <cms:title>Article 1</cms:title>
   <cms:location>New York, New York</cms:location>
      Here&amp;#39;s my article.&amp;nbsp; I hope it works out!

To access that content using the FM rendering engine, you actually have to do the following:

<#ftl ns_prefixes={"cms":""}>
<#assign article = .vars["cms:article"]>
<html xmlns="" xml:lang="en" lang="en">

      <div id="articleContent">
         <span>(${article["cms:location"]} – ${article["cms:date"]})</span>

If the current behavior is correct, I'd love to update the wiki so that everybody else can start experimenting with the WCM stuff right away.