cancel
Showing results for 
Search instead for 
Did you mean: 

Problems editing Share form's

guilherme_souza
Champ in-the-making
Champ in-the-making
I want to customize my Alfresco server, can i change or delete the labels that appears below the folder/document name?

[img]http://img694.imageshack.us/img694/5571/datadictionary.png[/img]
7 REPLIES 7

nmcminn
Champ in-the-making
Champ in-the-making
The information displayed in each list item in the document library is driven by a metadata template.  The defaults can be overridden in <tomcat_home>/shared/classes/alfresco/web-extension/share-config-custom.xml.  Here is what the default metadata template looks like in Alfresco 4:


      <template id="default">
          <line index="10" id="date">{date}{size}</line>
          <line index="20" id="description" view="detailed">{description}</line>
          <line index="30" id="tags" view="detailed">{tags}</line>
          <line index="40" id="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line>
          <line index="50" id="social" view="detailed">{social}</line>
      </template>

To change the display, you would override this template by adding something like this to share-custom-config.xml:


  <!– change metadata that is displayed in the docuemnt library list view –>
  <config evaluator="string-compare" condition="DocumentLibrary" replace="true">
      <metadata-templates>
          <!– Default (fallback) –>
          <template id="default">
              <line index="10" id="date">{date}{size}</line>
              <line index="20" id="description" view="detailed">{description}</line>
              <line index="30" id="tags" view="detailed">{tags}</line>
              <!– don't display the categories or the social options –>
              <!–<line index="40" id="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line>–>
              <!–<line index="50" id="social" view="detailed">{social}</line>–>
          </template>
      </metadata-templates>
  </config>

What this chunk of XML does is tell Share to use this as the default template for displaying document metadata in the list, replacing the configuration stored in share-documentlibrary-config.xml (which is a great place to look around at some of the various options).  We have removed the categories option and the social options in this example.

Once you have made the change in share-config-custom.xml, restart Share and you should see your document library display change to reflect the new metadata template.

And that's all there is to it!

guilherme_souza
Champ in-the-making
Champ in-the-making
Sorry for the horrible english but thanks Nathan that works!!  Smiley Very Happy

I've been searching a way to change it for so long time, and now i can display properties of aspects that i made.

nmcminn
Champ in-the-making
Champ in-the-making
Great to hear it's working for you, and happy to help!

guilherme_souza
Champ in-the-making
Champ in-the-making
Other problem had appeared, i tried to add a property that show the document date, but he returns: [Object object].

I think that i have to convert the data type but how i do this ?

jpfi
Champ in-the-making
Champ in-the-making
Hi,
well, I would be really helpful if you add your custom code/config here. Otherwise it's really hard to help you out.
Cheers, jan

guilherme_souza
Champ in-the-making
Champ in-the-making
Hi,
well, I would be really helpful if you add your custom code/config here. Otherwise it's really hard to help you out.
Cheers, jan

Thanks for the help, but I've already fixed it. Was a problem with data validation, then i made a Javascript to format the entered data.

douglascrp
World-Class Innovator
World-Class Innovator
Hi,
well, I would be really helpful if you add your custom code/config here. Otherwise it's really hard to help you out.
Cheers, jan

Thanks for the help, but I've already fixed it. Was a problem with data validation, then i made a Javascript to format the entered data.

Hi.

Can you share your solution?

Thanks