09-22-2011 10:02 AM
<aspect name="kc:HealthNewsItem">
<title>Knowledge Base Article</title>
<properties>
<property name="kc:news_id">
<title>Old News identifier</title>
<type>d:int</type>
</property>
<property name="kc:status_type">
<title>News status</title>
<type>d:text</type>
<constraints>
<constraint ref="kc:status_constraint"/>
</constraints>
</property>
</properties>
</aspect>
var title = args.title;
var body = args.body;
var news_id = args.id;
var article = companyhome..createNode("article", "cm:content");
article.addAspect("kc:HealthNewsItem");
article.properties["kc:news_id"] = news_id;
article.properties["cm:name"] = title;
article.properties["kc:status_type"] = "Archived";
article.content = args.body;
article.save();
model.article = article;
<html>
<head>
<title>Sample ${article.name}</title>
</head>
<body>
<p>Title : ${article.name} = ${article.id} = ${article.news_id}</p>
<p>Body : ${article.content}</p>
</body>
</html>
10-02-2011 03:13 PM
<html>
<head>
<title>Sample ${article.name}</title>
</head>
<body>
<p>Title : ${article.name} = ${article.id} = ${article.properties["kc:news_id"]}</p>
<p>Body : ${article.content}</p>
</body>
</html>
Hope this helps.
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.