how to concise the content-model

cancel
Showing results for 
Search instead for 
Did you mean: 
yuva
Active Member

how to concise the content-model

I am creating a content model like this,but i am using only two properties namely, date and company name. For this,I need to create a property for each node, i think it leads to a code redunduncy and memory wastage, could any one knows how to make these properties declared as a common property called date and company name and how can i use all over the content model wherever its needed?

<type name="my:maintainence">
<title>Maintainence</title>
<parent>cm:content</parent>
</type>
<type name="my:manualAttendanceCivil">
<title>Manual Attendance Civil</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:dateCivil">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:companyNameCivil">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="my:manualAttendanceCommercial">
<title>Manual Attendance For Commercial</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:dateCommercial">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:companyNameCommercial">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>

<type name="my:rmsFormat">
<title>RMS Format</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:rmsDate">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:zone">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="my:companyNameForRms">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>

1 Reply
afaust
Master

Re: how to concise the content-model

That is what aspects are for. Define those properties in an aspect (or two separate aspects) and apply those aspects to multiple nodes or as mandatory aspects on multiple types...