cancel
Showing results for 
Search instead for 
Did you mean: 

Edit content properties

rcortesr
Star Contributor
Star Contributor
Hi,

When I create a new content I would like to set only the custom properties. I want delete the following properties: title, description an author.

I think that is posible editing edit-content-properties.jsp.
How I can do it?

Thanks.
15 REPLIES 15

gavinc
Champ in-the-making
Champ in-the-making
You can edit web-client-config-properties.xml or better still your own web-client-config-custom.xml file to hide these properties.

However, doing this may remove these properties from all places in the client i.e. the edit properties dialog.

In the config file you can do the following:


<config evaluator="node-type" condition="content">
   <property-sheet>
      <show-property name="title" hide="true" />
      <show-property name="description" hide="true" />
   </property-sheet>
</config>

If you are creating custom content and want to hide these properties for only your custom type change the condition.

Hope that helps

rcortesr
Star Contributor
Star Contributor
I have already added the code that you propose, but the properties continue appearing.
This is my web-client-config-custom.xml:
<alfresco-config>
   <config evaluator="string-compare" condition="Languages">
      <languages>
         <language locale="es_ES">Spanish</language>
         <language locale="fr_FR">French</language>
         <language locale="de_DE">German</language>
         <language locale="ja_JP">Japanese</language>
      </languages>
   </config>
   <config evaluator="string-compare" condition="Content Wizards">
      <content-types>
         <type name="fac:factura" />
      </content-types>
   </config>

   <config evaluator="node-type" condition="fac:factura">
      <property-sheet>
         <show-property name="fac:NIF_Proveedor" />
         <show-property name="fac:Fecha_Factura" />
         <show-property name="fac:Numero_Factura" />
         <show-property name="fac:Base_Imponible" />
         <show-property name="fac:Impuestos" />
         <show-property name="fac:Total" />
         <show-property name="fac:Nombre_Proveedor" />
         <show-property name="fac:NIF_Cliente" />
         <show-property name="fac:Descripcion_Cliente" />
         <show-association name="fac:signOff" />
         <show-child-association name="fac:processSteps" />
      </property-sheet>
   </config>

   <config evaluator="node-type" condition="content">
      <property-sheet>
         <show-property name="title" hide="true" />
         <show-property name="description" hide="true" />
         <show-property name="author" hide="true" />
      </property-sheet>
   </config>


   <config evaluator="string-compare" condition="Advanced Search">
      <advanced-search>
         <content-types>
            <type name="fac:factura" />
         </content-types>
         <custom-properties>
         <meta-data type="fac:factura" property="fac:Numero_Factura" />
         <meta-data type="fac:factura" property="fac:Fecha_Factura" />
            <meta-data type="fac:factura" property="fac:NIF_Proveedor" />
         <meta-data type="fac:factura" property="fac:NIF_Cliente" />
         <meta-data type="fac:factura" property="fac:Descripcion_Cliente" />
         </custom-properties>
      </advanced-search>
   </config>

<config evaluator="string-compare" condition="Views">
      <!– the views available in the client –>
      <views>
         <!– default values for the views available in the client –>
         <view-defaults>
            <browse>
               <!– allowable values: list|details|icons –>
               <view>details</view>
               <page-size>
                  <list>20</list>
                  <details>80</details>
                  <icons>20</icons>
               </page-size>
            </browse>
         </view-defaults>
      </views>
</config>

</alfresco-config>

What is the problem??

Thanks.

gavinc
Champ in-the-making
Champ in-the-making
You need to have the properties defined for your custom type too i.e:

  
<config evaluator="node-type" condition="fac:factura">
      <property-sheet>
         <show-property name="title" hide="true" />
         <show-property name="description" hide="true" />
         <show-property name="author" hide="true" />
         <show-property name="fac:NIF_Proveedor" />
         <show-property name="fac:Fecha_Factura" />
         <show-property name="fac:Numero_Factura" />
         <show-property name="fac:Base_Imponible" />
         <show-property name="fac:Impuestos" />
         <show-property name="fac:Total" />
         <show-property name="fac:Nombre_Proveedor" />
         <show-property name="fac:NIF_Cliente" />
         <show-property name="fac:Descripcion_Cliente" />
         <show-association name="fac:signOff" />
         <show-child-association name="fac:processSteps" />
      </property-sheet>
   </config>

rcortesr
Star Contributor
Star Contributor
Hi,

I have copied your code in my web-client-config-custom but the properties appears.
If I use the prefixes the properties appears two times.
This the code with prefixes:
<config evaluator="node-type" condition="fac:factura">
      <property-sheet>
         <show-property name="mimetype" display-label-id="content_type"
                        component-generator="MimeTypeSelectorGenerator" />
         <show-property name="size" display-label-id="size"
                        converter="org.alfresco.faces.ByteSizeConverter"
                        show-in-edit-mode="false" />              
         <show-property name="cm:title" hide="true"/>
         <show-property name="cm:description" hide="true"/>
         <show-property name="cm:author" hide="true"/>
         <show-property name="fac:NIF_Proveedor" />
         <show-property name="fac:Fecha_Factura" />
         <show-property name="fac:Numero_Factura" />
         <show-property name="fac:Base_Imponible" />
         <show-property name="fac:Impuestos" />
         <show-property name="fac:Total" />
         <show-property name="fac:Nombre_Proveedor" />
         <show-property name="fac:NIF_Cliente" />
         <show-property name="fac:Descripcion_Cliente"/>
      
      </property-sheet>
   </config>

Thanks for all.

gavinc
Champ in-the-making
Champ in-the-making
I'm really sorry my bad, hide="true" is used for hiding actions not properties  Smiley Surprisedops:

You'll need the following to hide the properties:

<show-property name="cm:title" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="cm:description" show-in-edit-mode="false" show-in-view-mode="false" />
<show-property name="cm:author" show-in-edit-mode="false" show-in-view-mode="false" />

rcortesr
Star Contributor
Star Contributor
Hi,

your solution works perfect with the custom attributes.
But I don't hide the attributes title, description and author using show-in-edit-mode and show-in-view-mode.

this is my code:
<config evaluator="node-type" condition="fac:factura">
      <property-sheet>
         <show-property name="mimetype" display-label-id="content_type"
                        component-generator="MimeTypeSelectorGenerator" />
         <show-property name="size" display-label-id="size"
                        converter="org.alfresco.faces.ByteSizeConverter"
                        show-in-edit-mode="false" />              
         <show-property name="cm:title" show-in-edit-mode="false" show-in-view-mode="false" />
         <show-property name="cm:description" show-in-edit-mode="false" show-in-view-mode="false" />
         <show-property name="cm:author" show-in-edit-mode="false" show-in-view-mode="false" />
         <show-property name="fac:NIF_Proveedor" />
         <show-property name="fac:Fecha_Factura" />
         <show-property name="fac:Numero_Factura" />
         <show-property name="fac:Base_Imponible" />
         <show-property name="fac:Impuestos" />
         <show-property name="fac:Total" />
         <show-property name="fac:Nombre_Proveedor" />
         <show-property name="fac:NIF_Cliente" />
         <show-property name="fac:Descripcion_Cliente" />
      
      </property-sheet>
   </config>

What is the problem??

Thanks.

gavinc
Champ in-the-making
Champ in-the-making
I just copied your example…the cm: prefixes should not be there, try the following instead:


<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" />
<show-property name="author" show-in-edit-mode="false" show-in-view-mode="false" />

rcortesr
Star Contributor
Star Contributor
Hi,

now already it works well.

Thanks for all.

rcortesr
Star Contributor
Star Contributor
Hi,

another question: what is the name of the property edit in line?
Too I would like to hide this attribute.

Thanks.