cancel
Showing results for 
Search instead for 
Did you mean: 

Hide default metadata in view properties

jlabuelo
Champ on-the-rise
Champ on-the-rise
Hi all

Lets see if someone can help us with this doubt. We have built our CustomModel.xml file including the types and aspects (Metadata) we would like to add to the content we are storing in our Alfresco System. Everything works fine but there is something that, if possible we would like to modify.

Even if we just add the types and aspects we have created, to the documents we upload to Alfresco,and then we fullfill the values of the metadata, when we click in the "view details" option of the content we see some fields we do not use like "Title, Description…"

Is there any way that we could hide these default fields in the "View Detail" so the content only shows the metadata we have assigned? We do not know if this can be done in the CustomModel.xml, or in the web-client-config-custom.xml or in the Java code of the application.

Thanks a lot in advance!!
10 REPLIES 10

gavinc
Champ in-the-making
Champ in-the-making
Hi,

Yes, you can remove metadata that you don't want to see. How you do this depends on what client you are using.

If you're using Explorer have a look at this page http://wiki.alfresco.com/wiki/Displaying_Custom_Metadata on the wiki, the key to hiding properties is the "show-in-edit-mode" & "show-in-view-mode" attributes of the "show-property" element. The custom config needs to be applied to web-client-config-custom.xml.

If you're using Share have a look at this page http://wiki.alfresco.com/wiki/Forms_Examples#Displaying_Type_Metadata on the wiki, although not explicitly shown as an example you can hide a property by using a hide element instead i.e.


<config evaluator="node-type" condition="cm:content">
   <forms>
      <form>
         <field-visibility>
            <hide id="cm:title" />
            <hide id="cm:description" />
         </field-visibility>
      </form>
   </forms>
</config>

The custom config needs to be applied to share-config-custom.xml

jlabuelo
Champ on-the-rise
Champ on-the-rise
Thanks a lot Gavin

Very interesting.. did not know this. I have taken a look to the link and explains perfectly how to do it for the aspects and types you define in your custommodel… but sorry I have a question  Smiley Happy . How could we make it work for the default metadata?  I mean, Title, Description… dont know if they are from a specific type or if they are independent aspects they get assigned to each content in Alfresco by default.

Would this work with them? How can identify these metadata in the web-client-config-custom and set it as in the link you pass me?

Cheers

gavinc
Champ in-the-making
Champ in-the-making
The wiki articles also apply to built-in metadata not just custom models, in web-client-config-custom.xml you could have:

<config evaluator="node-type" condition="content">
   <property-sheet>
      <show-property name="title" show-in-edit-mode="false" show-in-view-mode="false" />
      <show-property name="description" show-in-edit-mode="false" show-in-view-mode="false" />
   </property-sheet>
</config>

NOTE: In Explorer config the "cm:" prefix is not required, in Share config it IS required.

rohitkhanna
Champ in-the-making
Champ in-the-making
How can I hide meta data of my custom models for specific user logged in ?

minnie
Champ in-the-making
Champ in-the-making
Hi all,
I suppose Jlabuelo searched for a method to hide inherited metadata for a custom type during details visualization, i.e. metadata coming from "cm:content". It's possible using the replace property into the definition of metadata list related to the custom type in the file web-client-config-custom.xml.
The following example shows how you can hide each metadata inherited by cm:content except for cm:title, and the custom metadata my:heigh, where  my:building is defined with cm:content as parent.

<config evaluator="node-type" condition="my:building" replace="true" >
      <property-sheet>
           <show-property name="cm:title" show-in-edit-mode="true" />
           <show-property name="my:heigh" display-label-id="size" show-in-edit-mode="false" />   
           <show-property name="my:windows" />
           <show-property name="my:cubic_foot" />
      </property-sheet>
</config>

Have a good day!

pmverma
Champ in-the-making
Champ in-the-making
Hi all, I am also having same problem with hiding metadata properties.

For a working copy document, I would like to hide some properties such as cm:created and cm:modified.

Could any give some clue on how to hide for working copy documents?

Thanks,
P. M. Verma

pmverma
Champ in-the-making
Champ in-the-making
Hi all,
My problem has been solved.I liked to hide only some field for working copy documents.So, this get done as following:

<config evaluator="aspect" condition="cm:workingcopy" replace="true">
      <forms>
         <form>
            <field-visibility>
            …………..
               <hide id="cm:creator" for-mode="view" />
               <hide id="cm:created" for-mode="view" />
               <hide id="cm:modifier" for-mode="view" />
               <hide id="cm:modified" for-mode="view" />
            ………….               
            </field-visibility>
         </form>
      </forms>
   </config>
Thanks,
P. M. Verma

what is the name of this file, coz its not in web-client-config-custom.xml,
can u just tell me the file name for this……


thanks,
Asif Khan

mitpatoliya
Star Collaborator
Star Collaborator
It's share-config-custom.xml file in alfresco share under
<ALF_HOME>/tomcat/share/classes/alfresco/web-extension
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.