cancel
Showing results for 
Search instead for 
Did you mean: 

Share custom content model

david_labbe
Champ in-the-making
Champ in-the-making
Hi there,

after spending a while creating a custom content model within the Alfresco explorer and testing that the right metadata appears in the right place (creating content / modify properties / view content …), I am experimenting with share.

I notice that a content created in the Explorer will show the custom content meta data in Share. But if I upload in share, I do not have access to the custom content model… Sounds like I am going ot have to apply another model to share. I this normal? if so how does one implement custom content in share? Also, is there any chance of customising the display of metadata in share? (kind of looks messy when you have a fair bit of metadata).

Kind regards

David
6 REPLIES 6

brian_robinson
Champ in-the-making
Champ in-the-making
First, you'll need to expose your types, aspects, and metadata for share, much like you would have done for the Alfresco Explorer UI using web-client-config-custom.xml.  In Share however, you'll use share-custom-config.xml.  Here's a direct link to an example that exposes the metadata for a custom type: http://wiki.alfresco.com/wiki/Forms#Types_and_Aspects .  To expose your types and aspects, you'll have to update this section:

   <!– Document Library config section –>
   <config evaluator="string-compare" condition="DocumentLibrary" replace="true">

      <!–
         Used by the "Manage Aspects" action

         For custom aspects, remember to also add the relevant i18n string(s)
            cm_myaspect=My Aspect
      –>
      <aspects>
         <!– Aspects that a user can see –>
         <visible>
            <aspect name="cm:generalclassifiable" />
            <aspect name="cm:complianceable" />
            <aspect name="cm:dublincore" />
            <aspect name="cm:effectivity" />
            <aspect name="cm:summarizable" />
            <aspect name="cm:versionable" />
            <aspect name="cm:templatable" />
            <aspect name="cm:emailed" />
            <aspect name="emailserver:aliasable" />
            <aspect name="cm:taggable" />
            <aspect name="app:inlineeditable" />
         </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>

      <!–
         Used by the "Change Type" action

         Define valid subtypes using the following example:
            <type name="cm:content">
               <subtype name="cm:mysubtype" />
            </type>

         Remember to also add the relevant i18n string(s):
            cm_mysubtype=My SubType
      –>
      <types>
        <type name="cm:content">
                <subtype name="legal:case" />
        </type>

         <type name="cm:folder">
            <subtype name="cm:myfoldersubtype" />
         </type>
      </types>
   </config>

maps
Champ in-the-making
Champ in-the-making
Hello,

As explained Brian, besides to its creation custom types, aspects, and metadata must be exposed to the Alfresco share UI .

The folowing wiki page http://wiki.alfresco.com/wiki/Forms_Examples whitch contains a number of examples of how to configure, use and customize Alfresco Forms.

That is not all, You need to configure The Alfresco Share upload form to select your custom document type when uploading them to the Share document Library. Otherwise, you have to run the "Change Type" action or upload them from the Alfresco Explorer Interface.

For more details on how the enable The Alfresco Share feature to set content type from the upload form, you can refer to following aricle:

http://www.iptech-offshore.net/blog/2010/06/15/alfresco-share-tip-content-type-selection-when-upload...

Hoping this will be helpfull.

oopepe
Champ in-the-making
Champ in-the-making
Hello,

in alfresco i can upload my web-client-config-custom.xml to Company Home > Data Dictionary > Web Client Extension and then run reload in the webclient console (http://localhost:8080/alfresco/faces/jsp/admin/webclientconfig-console.jsp) .
Is there a way to dynamically load the share-custom-config.xml file, too?

Regards,
pepe

mrvanes
Champ in-the-making
Champ in-the-making
I was wondering the same…

afaust
Legendary Innovator
Legendary Innovator
Hello,

currently, I am not aware of any possibility to reload the share-config-custom.xml during runtime. Such a feature would be simple to achieve with a bit of Java programming and extension of the XMLConfigService.
If you follow the deployment best practices and deploy the Share tier on an independent tomcat instance from the Repository tier, you should be able to perform a restart within a couple of seconds - depending on your user base / usage this may allow you to fit this into a small maintenance window.

Regards
Axel

mrvanes
Champ in-the-making
Champ in-the-making
Hi Axel,

Thank for for making this clear so quick!
I am learning the skills of workflow tweaking on a vanilla quick'n'dirty Alfresco install, so alas no fast share reload, nor XMLConfigService changes for me at the moment.

But now I think of it: I could use the tomcat built-in manager to restart only the share app!
Hmm…