cancel
Showing results for 
Search instead for 
Did you mean: 

cm:taggable Mandatory

naval
Champ in-the-making
Champ in-the-making
How to make cm:taggable mandatory in alfresco explorer?

I changed it in contentModel.xml property as
<mandatory>true</mandatory>

But it is giving javascript error in validation.js in the validateMandatory function at
if Loop condition…
Saying Object Expected.

function validateMandatory(control, message, showMessage)
{
   var result = true;

   if (control.value == null || control.value.length == 0)
   {
      informUser(control, message, showMessage);
      result = false;
   }

  return result;
}



Please help me in making it mandatory
1 REPLY 1

jpotts
World-Class Innovator
World-Class Innovator
I do not recommend changing the out-of-the-box content model. However, if you want to ignore that advice and make cm:taggable mandatory, I assume you want to do that for all instances of cm:content and its child types. If that's what you want to do, you need to add the following between the "</properties>" and "</type>" tags of the "cm:content" type definition on the contentModel.xml file:
         <mandatory-aspects>
            <aspect>cm:taggable</aspect>
         </mandatory-aspects>

A far better solution would be to create your own child type that extends "cm:content" and make cm:taggable mandatory on that type.

Jeff