<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Share customization - custom types do not appear in the Change Type dropdown in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101616#M29158</link>
    <description>&lt;P&gt;I am using Alfresco Community 5.2.&amp;nbsp;I used Alfresco Maven SDK 3.0 to generate AMPs for the repository tier and share UI tier. I did customization in the share config custom XML, etc.&lt;BR /&gt;&lt;BR /&gt;I have one base type, say A, which has the cm:content as its parent. Then the custom type A has 7 subtypes. This hierarchy is defined in the model xml.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now in the try-out alfresco tomcat while doing customization, I see type A as one of the options, when I click on the uploaded image and click "Change Type". But in this try-alfresco-tomcat, I still do not see my other subtypes in the Change Type options.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Should I do anything special for the subtypes as opposed to the main custom type?&lt;BR /&gt;&lt;BR /&gt;Then, in the Community 5.2 Alfresco Server, even after applying the generated AMPs, neither the base type nor any of the sub types I could see in the options of the Change Type control.&lt;BR /&gt;&lt;BR /&gt;Is there anything else that I need to do besides putting the AMPs in the appropriate folders and do applyamps.bat.&lt;/P&gt;</description>
    <pubDate>Tue, 03 Nov 2020 09:43:11 GMT</pubDate>
    <dc:creator>sepgs2004</dc:creator>
    <dc:date>2020-11-03T09:43:11Z</dc:date>
    <item>
      <title>Share customization - custom types do not appear in the Change Type dropdown</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101616#M29158</link>
      <description>&lt;P&gt;I am using Alfresco Community 5.2.&amp;nbsp;I used Alfresco Maven SDK 3.0 to generate AMPs for the repository tier and share UI tier. I did customization in the share config custom XML, etc.&lt;BR /&gt;&lt;BR /&gt;I have one base type, say A, which has the cm:content as its parent. Then the custom type A has 7 subtypes. This hierarchy is defined in the model xml.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Now in the try-out alfresco tomcat while doing customization, I see type A as one of the options, when I click on the uploaded image and click "Change Type". But in this try-alfresco-tomcat, I still do not see my other subtypes in the Change Type options.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;Should I do anything special for the subtypes as opposed to the main custom type?&lt;BR /&gt;&lt;BR /&gt;Then, in the Community 5.2 Alfresco Server, even after applying the generated AMPs, neither the base type nor any of the sub types I could see in the options of the Change Type control.&lt;BR /&gt;&lt;BR /&gt;Is there anything else that I need to do besides putting the AMPs in the appropriate folders and do applyamps.bat.&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 09:43:11 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101616#M29158</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2020-11-03T09:43:11Z</dc:date>
    </item>
    <item>
      <title>Re: Share customization - custom types do not appear in the Change Type dropdown</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101617#M29159</link>
      <description>&lt;P&gt;To see the change type option for your custom types, you have to add config like this in share config custom:&lt;/P&gt;

&lt;PRE&gt;&lt;A href="https://github.com/Alfresco/share/blob/develop/share/src/main/resources/alfresco/share-documentlibrary-config.xml#L568" target="_blank" rel="noopener nofollow noreferrer"&gt;&amp;lt;config evaluator="string-compare" condition="DocumentLibrary"&amp;gt;&amp;nbsp;	&lt;/A&gt;&amp;nbsp;        &lt;BR /&gt;  &amp;lt;types&amp;gt;
		&amp;lt;type name="cm:content"&amp;gt;
			&amp;lt;subtype name="demo:yourCustomTypeA"/&amp;gt;
                        &amp;lt;subtype name="demo:yourCustomTypeB"/&amp;gt;
......
		&amp;lt;/type&amp;gt;
                 &amp;lt;type name="demo:yourCustomTypeA"&amp;gt;
                        &amp;lt;subtype name="demo:yourCustomTypeB"/&amp;gt;
		&amp;lt;/type&amp;gt;
                 &amp;lt;type name="demo:yourCustomTypeB"&amp;gt;
                        &amp;lt;subtype name="demo:yourCustomTypeA"/&amp;gt;
		&amp;lt;/type&amp;gt;
.........
	&amp;lt;/types&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;See a discussion here on similar topic:&amp;nbsp;&lt;A href="https://hub.alfresco.com/t5/alfresco-content-services-forum/specialize-type/m-p/302889#M21866" target="_blank" rel="nofollow noopener noreferrer"&gt;https://hub.alfresco.com/t5/alfresco-content-services-forum/specialize-type/m-p/302889#M21866&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Now, just by ading the config you will start seeing the option to change the type in Change Type menu. But it will not work unless you customize the the Change Type webscript.&lt;/P&gt;
&lt;P&gt;&lt;U&gt;Here you have find a complete step by step process to do that:&lt;/U&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://javaworld-abhinav.blogspot.com/2020/06/change-type-of-custom-content-types.html" target="_blank" rel="nofollow noopener noreferrer"&gt;https://javaworld-abhinav.blogspot.com/2020/06/change-type-of-custom-content-types.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Nov 2020 22:29:47 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101617#M29159</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-11-03T22:29:47Z</dc:date>
    </item>
    <item>
      <title>Re: Share customization - custom types do not appear in the Change Type dropdown</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101618#M29160</link>
      <description>&lt;P&gt;demo:yourCustomTypeA, is the parent of demo:yourCustomTypeB, and has cm:content as its parent&lt;BR /&gt;demo:yourCustomTypeB is not the parent of demo:yourCustomTypeA&lt;BR /&gt;In the model definition, I have this way&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;types&amp;gt;
	&amp;lt;type name="demo:yourCustomTypeA"&amp;gt;
		&amp;lt;title&amp;gt;Base Document Type&amp;lt;/title&amp;gt;
		&amp;lt;parent&amp;gt;cm:content&amp;lt;/parent&amp;gt;
		&amp;lt;associations/&amp;gt;
		&amp;lt;mandatory-aspects&amp;gt;
			&amp;lt;aspect&amp;gt;demo:yourCustomAspect&amp;lt;/aspect&amp;gt;
		&amp;lt;/mandatory-aspects&amp;gt;
	&amp;lt;/type&amp;gt;
	&amp;lt;type name="demo:yourCustomTypeB"&amp;gt;
		&amp;lt;title&amp;gt;Board Meeting Agendas&amp;lt;/title&amp;gt;
		&amp;lt;parent&amp;gt;demo:yourCustomTypeA&amp;lt;/parent&amp;gt;
		&amp;lt;properties/&amp;gt;
		&amp;lt;associations/&amp;gt;
	&amp;lt;/type&amp;gt;
&amp;lt;/types&amp;gt;&lt;/PRE&gt;&lt;P&gt;This is the configuration for "string-compare" in the share-config-custom.xml&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;config evaluator="string-compare" condition="DocumentLibrary"&amp;gt;
	&amp;lt;aspects&amp;gt; 
		&amp;lt;visible&amp;gt;
		&amp;lt;aspect name="demo:yourCustomAspect"/&amp;gt;
		&amp;lt;/visible&amp;gt;
		&amp;lt;addable&amp;gt;&amp;lt;/addable&amp;gt;
		&amp;lt;removeable&amp;gt;&amp;lt;/removeable&amp;gt;
	&amp;lt;/aspects&amp;gt;
	&amp;lt;types&amp;gt;
		&amp;lt;type name="cm:content"&amp;gt;
			&amp;lt;subtype name="yourCustomTypeA" /&amp;gt;
			&amp;lt;subtype name="yourCustomTypeB" /&amp;gt;
		&amp;lt;/type&amp;gt;
		&amp;lt;type name="demo:yourCustomTypeA"&amp;gt;
			&amp;lt;subtype name="demo:yourCustomTypeB"/&amp;gt;
		&amp;lt;/type&amp;gt;
		&amp;lt;type name="demo:yourCustomTypeB"&amp;gt;
			&amp;lt;subtype name="demo:yourCustomTypeA"/&amp;gt;
		&amp;lt;/type&amp;gt;
	&amp;lt;/types&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;&lt;P&gt;My question is -&lt;BR /&gt;&lt;STRONG&gt;Why would we have to say A's subtype as B, and B's subtype as A?&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Would not saying A's subtype as B sufficient?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I have a rule defined at a folder folderB, which would specialize the type of the document that gets created in this folder to yourCustomTypeB.&lt;/P&gt;&lt;P&gt;What happens is, when I do edit properties on a document in folderB, I only see the properties that belong to the aspect yourCustomAspect, and not of type cm:content. For example, I am not seeing name, title or description properties at all to edit.&lt;BR /&gt;&lt;BR /&gt;&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;I could not reason out how and why this is happening&lt;/STRONG&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Only for the base type demo:yourCustomTypeA, I have "node-type" config defined in the share-config-custom.xml&lt;BR /&gt;I thought defining for the parent would be used for sub type.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Should I define "node-type" separtely for demo:yourCustomTypeB as well?&lt;/STRONG&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;&amp;lt;config evaluator="node-type" condition="demo:yourCustomTypeA"&amp;gt;
	&amp;lt;forms&amp;gt;
	&amp;lt;!-- Default form configuration for the cm:content type --&amp;gt;
	&amp;lt;form&amp;gt;
		&amp;lt;field-visibility&amp;gt;
			&amp;lt;show id="cm:name"/&amp;gt;
			&amp;lt;show id="cm:title" force="true"/&amp;gt;
			&amp;lt;show id="cm:description" force="true"/&amp;gt;
			...
		&amp;lt;/field-visibility&amp;gt;
		&amp;lt;appearance&amp;gt;
			&amp;lt;field id="cm:name"&amp;gt;
				&amp;lt;control&amp;gt;
					&amp;lt;control-param name="maxLength"&amp;gt;255&amp;lt;/control-param&amp;gt;
				&amp;lt;/control&amp;gt;
			&amp;lt;/field&amp;gt;
			&amp;lt;field id="cm:title"&amp;gt;
				&amp;lt;control template="/org/alfresco/components/form/controls/textfield.ftl"/&amp;gt;
			&amp;lt;/field&amp;gt;
			...
		&amp;lt;/appearance&amp;gt;
	&amp;lt;/form&amp;gt;

	&amp;lt;!-- Document Library pop-up Edit Metadata form --&amp;gt;
	&amp;lt;form id="doclib-simple-metadata"&amp;gt;
		&amp;lt;field-visibility&amp;gt;
			&amp;lt;show id="cm:name"/&amp;gt;
			&amp;lt;show id="cm:title" force="true"/&amp;gt;	
			&amp;lt;show id="cm:description" force="true"/&amp;gt;	
			...
		&amp;lt;/field-visibility&amp;gt;
		&amp;lt;edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl"/&amp;gt;
		&amp;lt;appearance&amp;gt;
			&amp;lt;field id="cm:name"&amp;gt;
				&amp;lt;control&amp;gt;
					&amp;lt;control-param name="maxLength"&amp;gt;255&amp;lt;/control-param&amp;gt;
				&amp;lt;/control&amp;gt;
			&amp;lt;/field&amp;gt;
			&amp;lt;field id="cm:title"&amp;gt;
				&amp;lt;control template="/org/alfresco/components/form/controls/textfield.ftl"/&amp;gt;
			&amp;lt;/field&amp;gt;
			...
		&amp;lt;/appearance&amp;gt;
	&amp;lt;/form&amp;gt;

	&amp;lt;form id="doclib-inline-edit"&amp;gt;
		&amp;lt;field-visibility&amp;gt;
			&amp;lt;show id="cm:name"/&amp;gt;
			&amp;lt;show id="cm:content" force="true"/&amp;gt;
			&amp;lt;show id="cm:title" force="true"/&amp;gt;
			...
		&amp;lt;/field-visibility&amp;gt;
		&amp;lt;appearance&amp;gt;
			&amp;lt;field id="cm:name"&amp;gt;
				&amp;lt;control&amp;gt;
				&amp;lt;control-param name="maxLength"&amp;gt;255&amp;lt;/control-param&amp;gt;
				&amp;lt;/control&amp;gt;
			&amp;lt;/field&amp;gt;
			&amp;lt;field id="cm:title"&amp;gt;
				&amp;lt;control template="/org/alfresco/components/form/controls/textfield.ftl"/&amp;gt;
			&amp;lt;/field&amp;gt;		
		&amp;lt;/appearance&amp;gt;
	&amp;lt;/form&amp;gt;
	
	&amp;lt;/forms&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 10 Nov 2020 11:34:13 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101618#M29160</guid>
      <dc:creator>sepgs2004</dc:creator>
      <dc:date>2020-11-10T11:34:13Z</dc:date>
    </item>
    <item>
      <title>Re: Share customization - custom types do not appear in the Change Type dropdown</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101619#M29161</link>
      <description>&lt;P&gt;You don't have to do that, as mentioned earlier type/subtype mapping depends on content model definition. In this case this would be ideal case:&lt;/P&gt;
&lt;PRE&gt;&amp;lt;config evaluator="string-compare" condition="DocumentLibrary"&amp;gt;
	&amp;lt;aspects&amp;gt; 
		&amp;lt;visible&amp;gt;
		&amp;lt;aspect name="demo:yourCustomAspect"/&amp;gt;
		&amp;lt;/visible&amp;gt;
		&amp;lt;addable&amp;gt;&amp;lt;/addable&amp;gt;
		&amp;lt;removeable&amp;gt;&amp;lt;/removeable&amp;gt;
	&amp;lt;/aspects&amp;gt;
	&amp;lt;types&amp;gt;
		&amp;lt;type name="cm:content"&amp;gt;
			&amp;lt;subtype name="yourCustomTypeA" /&amp;gt;
		&amp;lt;/type&amp;gt;
		&amp;lt;type name="demo:yourCustomTypeA"&amp;gt;
			&amp;lt;subtype name="demo:yourCustomTypeB"/&amp;gt;
		&amp;lt;/type&amp;gt;
	&amp;lt;/types&amp;gt;
&amp;lt;/config&amp;gt;&lt;/PRE&gt;
&lt;P&gt;A suggestion, i would recommed to not to create very deep nesting. That "may" cause performance issues while searching. 1-2 level is ok.&lt;/P&gt;</description>
      <pubDate>Tue, 10 Nov 2020 14:24:32 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/share-customization-custom-types-do-not-appear-in-the-change/m-p/101619#M29161</guid>
      <dc:creator>abhinavmishra14</dc:creator>
      <dc:date>2020-11-10T14:24:32Z</dc:date>
    </item>
  </channel>
</rss>

