cancel
Showing results for 
Search instead for 
Did you mean: 

[Solved]How to make the type visable on the ui.

tdt
Champ in-the-making
Champ in-the-making
Hi,

i have created a new type

<types>
   <type name="fgov:ICTPM">
      <title>ICT Project Management</title>
      <parent>cm:content</parent>
   </type>      
</types>

now as you see this type does nos hase any properties. this is because we already have made aspects so these aspects are added the the type when the content is created.
Now is it possible to show the type title in the userinterface?
It would be handy to see it in the properties.
i manage to show it in the action rules and in the creation of content bud i can't found how i can show it in the properties of a document.

Thanks in advance.
4 REPLIES 4

jayjayecl
Confirmed Champ
Confirmed Champ
You are mixing up the concept of "Content type title", and "content object title".
the title you provided ("ICT Project Management") to your custom content type is just a way to name it in the UI. If yuo want any object to have this very title, you have to override the cm:title property (from dublincore schema)

You should better do the following :

<types>
<type name="fgov:ICTPM">
<title>ICT Project content type</title>
<parent>cm:content</parent>
<properties>
      <overrides>
            <property name="cm:title">
               <default>ICT Project Management</default>
                                        <mandatory>true</mandatory>
            </property>
      </overrides>
<mandatory-aspects>
            <aspect>yourcustom:aspect_1</aspect>
            <aspect>yourcustom:aspect_2</aspect>
etc …
</mandatory-aspects>
</type>
</types>

And if you want this title not to be editable via the UI, you will have to override the UI config for this property, via the file web-client-config-custom.xml.

You should have a look at the Developer Guide :
http://wiki.alfresco.com/wiki/Beginner_Guide_-_Content_Modeling
http://wiki.alfresco.com/wiki/Displaying_Custom_Metadata

tdt
Champ in-the-making
Champ in-the-making
JayJay,

thanks for the reply.

i change my code in the custommoder.xml to
<type name="fgov:ICTPM">
      <title>ICT Project content type</title>
      <parent>cm:content</parent>
      <overrides>
         <property name="cm:title">
            <default>ICT Project Management</default>
         </property>
      </overrides>
      <mandatory-aspects>
               <aspect>fgov:ProjectManagment</aspect>
               <aspect>fgov:ProjectManagmentDocument</aspect>
               <aspect>fgov:visa</aspect>
      </mandatory-aspects>
   </type>
but the cm:title does not seem to change.. when i create a new content of this type the cm:title standaards takes the content name.
i tryed to change it with cm:author but that did not work either. You can see i removed the mandatory part and some other lines.. they gave errors.

The aspects are working fine and its mutch easyer this way.. thx

any ideas how the cm:title does not change of cm:author?  thx..

jayjayecl
Confirmed Champ
Confirmed Champ
First, it seems that you forgot the tag <properties>  </properties>, surronding the <overrides> part.
Try again adding it.

Secondly, it it's still not working, this will show that an Alfresco automatic behaviour copies the file Name into the file title.
Then, this will be more tricky, but you can do the following :


    <type name="fgov:ICTPM">
          <title>ICT Project content type</title>
          <parent>cm:content</parent>
<properties>
             <property name="fgov:title">
<type>d:text</type>
                <default>ICT Project Management</default>
             </property>
          </properties
          <mandatory-aspects>
                   <aspect>fgov:ProjectManagment</aspect>
                   <aspect>fgov:ProjectManagmentDocument</aspect>
                   <aspect>fgov:visa</aspect>
          </mandatory-aspects>
       </type>

And then customize the UI display :
in your web-client-config-custom.xml :


<config evaluator="node-type" condition="fgov:ICTPM">
    <property-sheet>
         <show-property name="title"show-in-view-mode="false" show-in-edit-mode="false"  read-only="true"/>
         <show-property name="fgov:title" read-only="true" show-in-view-mode="true" show-in-edit-mode="false" />
</property-sheet>
</config>

tdt
Champ in-the-making
Champ in-the-making
JayJay,

Thanks a lot,

The only change i have done is:
<config evaluator="node-type" condition="fgov:ICTPM">
    <property-sheet>
               <show-property name="fgov:title" read-only="true" show-in-view-mode="true" show-in-edit-mode="false" />
</property-sheet>
</config>
title was needed for the workflow…

This works perfectly. And thanks for the code you gave me.

Best Regards,
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.