cancel
Showing results for 
Search instead for 
Did you mean: 

Learning to display new content types in share.

delaghetto
Champ in-the-making
Champ in-the-making
Hi all,

I have installed Alfresco 4.2c from the .bin installer in Ubuntu Server 12.04LTS

I've followed ecmarchitect.com "Working with custom content types" 2nd edition to create a new content type.

I'm trying to create exactly what's explained in the first 2 chapters of the book, so I have downloaded the source code from http://ecmarchitect.com/images/articles/alfresco-content/alfresco-content-tutorial-project.zip

I have copied the following files to my installation:

All in /opt/alfresco-4.2.c/tomcat/

/webapps/share/WEB-INF/classes/alfresco/web-extension/share-config-custom.xml
/shared/classes/alfresco/extension/someco-model-context.xml
/shared/classes/alfresco/extension/model/scModel.xml

After copying this 3 files, I restart the server using the command "service alfresco restart"

Also for testing purposes, all files in the webroot have chmod 777

The thing is there is nothing new in my Share Sites, nothing defined in the SC content model. Is there anything else I need to do?

Thanks in advance for the help.
9 REPLIES 9

abarisone
Star Contributor
Star Contributor

delaghetto
Champ in-the-making
Champ in-the-making
OK, I don't know what was wrong, something with tomcat I guess, as the restart wasn't been done correctly. After rebooting the full server, the custom content types appeared,

Now I'm implementing my own content types, and I would like to test them without having to restart the tomcat service all the time, as it takes a lot. Is there any command for applying and testing the custom content types into alfresco and share?

I'm not using eclipse as I'm making very simple changes, just modifying the xml files from a text editor. I read that I could:

Execute the org.alfresco.repo.dictionary.TestModel Java Application
This test includes a light bootstrap which is extremely fast to execute allowing for quick edit and test cycles of new models.
Usage is as follows:
org.alfresco.repo.dictionary.TestModel [model classpath location]*


Can I do this without Eclipse??

vassilisx
Champ in-the-making
Champ in-the-making
Hi delaghetto,

as I face a similar problem, I would like to ask you wether the new types and aspects you apply appear within folder rules aswell. Thing is, in my case I can view them in the documents' properties, but not in the folder rule form.

Thank you.

jpotts
World-Class Innovator
World-Class Innovator
Vassilis,

I have recently tested the content types tutorial code with Alfresco Community Edition 4.2.c and have verified that the types and aspects show up in the "change type" dialog, the "manage aspects" dialog, and the rule configuration dropdowns.

What version are you running?

Jeff

Does deploying the custom model from Explorer webapp (/alfresco) work for you?
You know, via the Data Dictionary?

robertg
Champ in-the-making
Champ in-the-making
So I've written a custom content model skeleton, and following Jeff's guide, and my new aspects and types are showing in the rules management drop-downs, but no where else. I don't see them in the repository anywhere (that I can find) and I don't have an option of creating an asset using the custom types. I've tried putting the custom xmls in the webapps folders as described by the article and in the shared folder, with the exact same amount.

Is there something obvious I'm missing?

rjohnson
Star Contributor
Star Contributor
You need to "tell" share about custom types and aspects or they don't show up.

Have you listed your custom aspects in


      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="my:aspect1"/>
            <aspect name="my:aspect2"/>
         </visible>

         <!– Aspects that a user can add. Same as "visible" if left empty –>
         <addable> </addable>

         <!– Aspects that a user can remove. Same as "visible" if left empty –>
         <removeable> </removeable>
      </aspects>


and your types in


      <types>
         <type name="cm:content">
            <subtype name="my:doctype1"/>
            <subtype name="my:doctype12"/>

         </type>
      </types>


sections in share-config-custom.xml?

Bob Johnson

gbousquet
Champ in-the-making
Champ in-the-making
Very useful .. Thanks

davidbalt
Champ in-the-making
Champ in-the-making
I have set up a custom model extending from cm:folder, and downloaded an extension from http://labs.atolcd.com/projects/spacetpl-customviews that allows me to set up a custom view on a Share space in the Document Library.  I've written the .ftl I need and placed it in /Data Dictionary/Presentation Templates, and all is well.

Now, how can I get the custom view to be used whenever the user browses to a space that matches my new type?

I have set up: <u>
<li>share-config-custom.xml (show properties from my custom model in "Details" view)</li>
<li>custom-slingshot-application-context.xml (custom evaluator)</li>
</ul>

But I am struggling with how to bind the custom view to the space automatically.