04-04-2011 05:41 PM
$upload = $home->createChild('cm_content', 'cm_contains', $file_name);
But for example, when I try the following:$upload = $home->createChild('ls_document', 'cm_contains', $file_name);
it gives me an error when $session->save() is called. $upload->ls_classID = "ENGL316001";
works fine and is defined in a model file as <type name="ls:document">
<title>Lesson</title>
<parent>cm:content</parent>
<properties>
<property name="ls:filename">
<title>File Name</title>
<type>d:text</type>
</property>
<property name="ls:classID">
<title>Section Number</title>
<type>d:text</type>
</property>
<property name="ls:description">
<title>Description</title>
<type>d:text</type>
</property>
<property name="ls:custom">
<title>Custom data</title>
<type>d:text</type>
<multiple>true</multiple>
</property>
</properties>
<mandatory-aspects>
<aspect>cm:titled</aspect>
</mandatory-aspects>
</type>
the ls:[property] properties here can be successfully applied to a document of type cm:content (which confuses me, but I guess it works) but I can't figure out how to give a node a type of ls:document. Any tips?
04-06-2011 11:47 AM
$upload = $home->createChild('{http://www.example.org/model/content/1.0}document', 'cm_contains', $file_name);
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.