cancel
Showing results for 
Search instead for 
Did you mean: 

how to use an aspect many times

mahdi
Champ in-the-making
Champ in-the-making
Hi All,

is it possible to apply an aspect many times to a node , something similar to : <multiple>true</multiple> in the case of property ?
in fact, i created an aspect which include many properties (Name, Description, …) and i want to use it as much as i need.

is it possible to use association??

please help
2 REPLIES 2

derek
Star Contributor
Star Contributor
Hi,
That's an interesting use-case, but one that we don't support i.e. metadata is bound to the node instance and not to the aspect instance.  You could certainly add an aspect and hang child nodes (hidden nodes of your own type) off that.  For example, in forumModel.xml:

      <aspect name="fm:discussable">
         <associations>
            <child-association name="fm:discussion">
               <source>
                  <mandatory>false</mandatory>
                  <many>false</many>
               </source>
               <target>
                  <class>fm:forum</class>
                  <mandatory enforced="true">true</mandatory>
                  <many>false</many>
               </target>
               <duplicate>false</duplicate>
            </child-association>
         </associations>
      </aspect>

mahdi
Champ in-the-making
Champ in-the-making
thanks for the reply
could you please explain , i didn't get it