<?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 Re: cmobject metadata templates in Alfresco Forum</title>
    <link>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148658#M39286</link>
    <description>&lt;P&gt;OK that answers it, thank you.&lt;/P&gt;</description>
    <pubDate>Mon, 26 Jun 2023 03:26:03 GMT</pubDate>
    <dc:creator>roycepugh</dc:creator>
    <dc:date>2023-06-26T03:26:03Z</dc:date>
    <item>
      <title>cmobject metadata templates</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148656#M39284</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I'm trying to display a custom type matadata template. This type extends cm:cmobject, like this:&lt;/P&gt;&lt;PRE&gt;&amp;lt;type name="tc:box"&amp;gt;
	&amp;lt;title&amp;gt;Box&amp;lt;/title&amp;gt;
	&amp;lt;parent&amp;gt;cm:cmobject&amp;lt;/parent&amp;gt;
	&amp;lt;properties&amp;gt;
		&amp;lt;property name="tc:boxName"&amp;gt;
			&amp;lt;type&amp;gt;d:int&amp;lt;/type&amp;gt;
		&amp;lt;/property&amp;gt;				
	&amp;lt;/properties&amp;gt;
&amp;lt;/type&amp;gt;&lt;/PRE&gt;&lt;P&gt;Following the official &lt;A href="https://docs.alfresco.com/content-services/7.1/tutorial/share/doclib/#adding-new-metadata-templates" target="_self" rel="nofollow noopener noreferrer"&gt;Alfresco documentation&lt;/A&gt;, I've declared the evaluators:&lt;/P&gt;&lt;PRE&gt;&amp;lt;bean id="tc.evaluator.isBox" parent="evaluator.doclib.action.nodeType"&amp;gt;
	&amp;lt;property name="types"&amp;gt;
		&amp;lt;list&amp;gt;
			&amp;lt;value&amp;gt;tc:box&amp;lt;/value&amp;gt;
		&amp;lt;/list&amp;gt;
	&amp;lt;/property&amp;gt;
&amp;lt;/bean&amp;gt;&lt;/PRE&gt;&lt;P&gt;And the metadata template:&lt;/P&gt;&lt;PRE&gt;&amp;lt;template id="tcBoxMetadataTemplate"&amp;gt;
	&amp;lt;evaluator&amp;gt;tc.evaluator.isBox&amp;lt;/evaluator&amp;gt;
	&amp;lt;line index="10" id="description" view="detailed"&amp;gt;I AM A BOX&amp;lt;/line&amp;gt;
&amp;lt;/template&amp;gt;	&lt;/PRE&gt;&lt;P&gt;Everything in the same way I do with folders or content. I'm able to change the metadata displayed in custon types that extends&amp;nbsp;cm:folder or&amp;nbsp;cm:content, but not in this particular case. In fact it doesn't show any information at all, not even a default icon, like the folder was empty.&lt;/P&gt;&lt;P&gt;Is there any limitation on adding new metadata templates or do I have to declare this custom type somewhere, maybe?&lt;/P&gt;&lt;P&gt;Thank you in advanced! Regards.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 11:09:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148656#M39284</guid>
      <dc:creator>tcuser</dc:creator>
      <dc:date>2023-06-14T11:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: cmobject metadata templates</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148657#M39285</link>
      <description>&lt;P&gt;If you want to use Alfresco Share standard Document Library you need to inherit your custom type from &lt;FONT face="andale mono,times"&gt;cm:folder&lt;/FONT&gt; or &lt;FONT face="andale mono,times"&gt;cm:content&lt;/FONT&gt; base type. Alternatively, you can modify this component to show nodes inheriting from &lt;FONT face="andale mono,times"&gt;cm:cmobject&lt;/FONT&gt; base type.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Jun 2023 13:28:33 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148657#M39285</guid>
      <dc:creator>angelborroy</dc:creator>
      <dc:date>2023-06-14T13:28:33Z</dc:date>
    </item>
    <item>
      <title>Re: cmobject metadata templates</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148658#M39286</link>
      <description>&lt;P&gt;OK that answers it, thank you.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 03:26:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148658#M39286</guid>
      <dc:creator>roycepugh</dc:creator>
      <dc:date>2023-06-26T03:26:03Z</dc:date>
    </item>
    <item>
      <title>Re: cmobject metadata templates</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148659#M39287</link>
      <description>&lt;P&gt;Hi Ángel,&lt;/P&gt;&lt;P&gt;Thank you for your response. What's the component I need to modify in order to show cmobject properties?&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2023 08:26:34 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148659#M39287</guid>
      <dc:creator>tcuser</dc:creator>
      <dc:date>2023-06-26T08:26:34Z</dc:date>
    </item>
    <item>
      <title>Re: cmobject metadata templates</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148660#M39288</link>
      <description>&lt;P&gt;Ok, I *think* I finally detect where to add my custom type in order to display those nodes.&lt;/P&gt;&lt;P&gt;It seems to me that the file filters.lib.js (inside the alfresco-share-services.amp --&amp;gt; alfresco-share-services-11.140/alfresco/templates/webscripts/org/alfresco/slingshot/documentlibrary) declares the type of nodes that are displayed in the Share explorer:&lt;/P&gt;&lt;PRE&gt;   TYPE_MAP:
   {
      "documents": '+(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")',
      "folders": '+(TYPE:"folder" OR TYPE:"app:folderlink")',
      "images": '+@cm\\:content.mimetype:image/*'
   }&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;I copied this file into my eclipse project in&amp;nbsp;&lt;SPAN&gt;src &amp;gt; main &amp;gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;resources&amp;nbsp;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;alfresco&amp;nbsp;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;extension&amp;nbsp;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;templates&amp;nbsp;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;webscripts&amp;nbsp;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;org&amp;nbsp;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;alfresco&amp;nbsp;&amp;gt;&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN&gt;slingshot &amp;gt; documentlibrary and&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;changed it like this:&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;   TYPE_MAP:
   {
      "documents": '+(TYPE:"content" OR TYPE:"app:filelink" OR TYPE:"folder")',
      "folders": '+(TYPE:"folder" OR TYPE:"tc:box" OR TYPE:"app:folderlink")',
      "images": '+@cm\\:content.mimetype:image/*'
   },&lt;/PRE&gt;&lt;P&gt;But nothing happens... Alfresco does not display tc:box objects.&lt;/P&gt;&lt;P&gt;I don't know if I'm not overriding this component correctly or this isn't the solution at all.&lt;/P&gt;&lt;P&gt;Can anyone help me with this one? Thank you!&lt;/P&gt;</description>
      <pubDate>Fri, 30 Jun 2023 10:39:03 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148660#M39288</guid>
      <dc:creator>tcuser</dc:creator>
      <dc:date>2023-06-30T10:39:03Z</dc:date>
    </item>
    <item>
      <title>Re: cmobject metadata templates</title>
      <link>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148661#M39289</link>
      <description>&lt;P&gt;Ok, it seems it's&amp;nbsp;not enough to overwrite the documentlibrary webscript, since finally it calls the FileFolderService, where the type of nodes the webscript returns are declared:&lt;/P&gt;&lt;PRE&gt;    /** Shallow search for files and folders with a name pattern */
    private static final String XPATH_QUERY_SHALLOW_ALL = "./*" + "[like(@cm:name, $cm:name, false)" + " and not (subtypeOf('"
            + ContentModel.TYPE_SYSTEM_FOLDER + "'))" + " and (subtypeOf('" + ContentModel.TYPE_FOLDER + "') or subtypeOf('"
            + ContentModel.TYPE_CONTENT + "')" + " or subtypeOf('" + ContentModel.TYPE_LINK + "'))]";

    /** Deep search for files and folders with a name pattern */
    private static final String XPATH_QUERY_DEEP_ALL = ".//*" + "[like(@cm:name, $cm:name, false)" + " and not (subtypeOf('"
            + ContentModel.TYPE_SYSTEM_FOLDER + "'))" + " and (subtypeOf('" + ContentModel.TYPE_FOLDER + "') or subtypeOf('"
            + ContentModel.TYPE_CONTENT + "')" + " or subtypeOf('" + ContentModel.TYPE_LINK + "'))]";

    /** Deep search for folders with a name pattern */
    private static final String XPATH_QUERY_DEEP_FOLDERS = ".//*" + "[like(@cm:name, $cm:name, false)" + " and not (subtypeOf('"
            + ContentModel.TYPE_SYSTEM_FOLDER + "'))" + " and (subtypeOf('" + ContentModel.TYPE_FOLDER + "'))]";

    /** Deep search for files with a name pattern */
    private static final String XPATH_QUERY_DEEP_FILES = ".//*" + "[like(@cm:name, $cm:name, false)" + " and not (subtypeOf('"
            + ContentModel.TYPE_SYSTEM_FOLDER + "'))" + " and (subtypeOf('" + ContentModel.TYPE_CONTENT + "')" + " or subtypeOf('"
            + ContentModel.TYPE_LINK + "'))]";&lt;/PRE&gt;&lt;P&gt;Now... How can I override an Alfresco service implementation?&lt;/P&gt;&lt;P&gt;Thank you! &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://connect.hyland.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 03 Jul 2023 11:18:25 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-forum/cmobject-metadata-templates/m-p/148661#M39289</guid>
      <dc:creator>tcuser</dc:creator>
      <dc:date>2023-07-03T11:18:25Z</dc:date>
    </item>
  </channel>
</rss>

