01-20-2011 10:44 AM
<Article xmlns:alf="http://www.alfresco.org" xmlns:chiba="http://chiba.sourceforge.net/xforms" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:pr="http://www.alfresco.org/alfresco/pr" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<name>
some name
</name>
<title>
some title
</title>
<writer>
Mister X
</writer>
<content>
some content of the article
</content>
</Article>
01-20-2011 11:08 AM
02-01-2011 12:23 PM
<bean class="org.alfresco.module.org_alfresco_module_wcmquickstart.rendition.BootstrapRenditionDefinition">
<property name="name" value="xmlArticle"/>
<property name="renderingEngineName" value="freemarkerRenderingEngine"/>
<property name="parameters">
<map>
<entry key="runAs" value="System"/>
<entry key="template_path" value="/Company Home/Data Dictionary/Presentation Templates/xmlArticle.ftl"/>
</map>
</property>
</bean>
2. create xmlArticle.ftl (as example above, but I replaced "document" to "node") and load it to /Company Home/Data Dictionary/Presentation Templates/xmlArticle.ftl"
V Inherit Rendition Config (this param is cheked)
Rendition Config:
ws:article=xmlArticle
4. Add create content02-01-2011 12:35 PM
ws:article=ws:xmlArticle
02-02-2011 12:10 PM
<name>
some name
</name>
<title>
some title
</title>
<Description>
Some Description
</Description>
<content>
the content of the article
</content>
</Article>
I don't sure that Rendition Service is what I need, but i newbie in Alfresco.
02-03-2011 07:22 AM
http://my.example.com/products/my-product.xml?view=raw
The final option (that springs to mind) is to specify the template to be used on the asset itself by setting a value for the ws:templateName property. The value would be "raw" in our example. For the sake of this description, I'll assume the first approach - a custom content type.
<type name="ws:xmlarticle">
<title>XML Article</title>
<parent>cm:content</parent>
</type>
<bean class="org.alfresco.module.org_alfresco_module_wcmquickstart.rendition.BootstrapRenditionDefinition">
<property name="name" value="xmlArticle"/>
<property name="renderingEngineName" value="freemarkerRenderingEngine"/>
<property name="parameters">
<map>
<entry key="runAs" value="System"/>
<entry key="template_path" value="/app:company_home/app:dictionary/app:content_templates/cm:xmlArticle.ftl"/>
<entry key="destination-path-template" value="${cwd}/${name}.xml" />
<entry key="rendition-nodetype" value="{http://www.alfresco.org/model/website/1.0}xmlarticle" />
</map>
</property>
</bean>
<@region id="main" scope="template"/>
<?xml version="1.0" encoding="UTF-8"?>
<template-instance>
<title>Raw</title>
<description>Template that just sends the asset content raw</description>
<template-type>raw</template-type>
<components>
<component>
<region-id>main</region-id>
<url>/content/current</url>
</component>
</components>
</template-instance>
<?xml version="1.0" encoding="UTF-8"?>
<page>
<id>raw</id>
<template-instance>raw</template-instance>
<authentication>none</authentication>
</page>
cmis:document=baseTemplate,ws:indexPage=sectionpage1,ws:article=articlepage1,ws:xmlarticle=raw
paramList.add(new ParameterDefinitionImpl(PARAM_MIME_TYPE, DataTypeDefinition.TEXT, false, getParamDisplayLabel(PARAM_MIME_TYPE)));
<entry key="mime-type" value="text/xml" />
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.