Question about add an aspect

cancel
Showing results for 
Search instead for 
Did you mean: 
YanFeiHu
Active Member II

Question about add an aspect

Jump to solution

Hi Community;

    I want to add an aspect 'cc:anydownload'.

    In share-config-custom.xml I add the <aspect name="cc:anydownload" />.

   And also I create the <aspect name="cc:anydownload">  in customModel.xml.

   Restart alfresco, then click 'Manage aspects', I can see the 'cc:anydownload' in the left list.

   But when I click 'Apple' button, the system told me that can not add this aspect.

   Please refer the picture as following, Thanks!

Model.png

 

1 Solution

Accepted Solutions
angelborroy
Alfresco Employee

Re: Question about add an aspect

Jump to solution

You may follow then this instructions I'm copy-pasting from the link I gave you before:

Localizing Strings for Custom Content Models

We’ve put off localizing the form labels until now. To fix this, first create a messages bundle, then register it with a Spring bean. Here are the steps:

  1. Create a new folder called "messages" in $TUTORIAL_HOME/content-tutorial-share/src/main/resources/alfresco/web-extension. If the folder is already there, delete any files that may already be present.
  2. In the messages folder, create a new file called "scModel.properties" with the following content:

    #sc:doc
    type.sc_doc=SomeCo Doc
    assoc.sc_relatedDocuments=Related Documents
    
    #sc:whitepaper
    type.sc_whitepaper=SomeCo Whitepaper
    search.form.desc.sc_whitepaper=Search for SomeCo Whitepapers
    
    #sc:webable
    aspect.sc_webable=SomeCo Webable
    prop.sc_published=Published
    prop.sc_isActive=Active?
    
    #sc:productRelated
    aspect.sc_productRelated=SomeCo Product Related
    prop.sc_product=Product
    prop.sc_version=Version
Hyland Developer Evangelist

View solution in original post

5 Replies
YanFeiHu
Active Member II

Re: Question about add an aspect

Jump to solution

Hi Team;

      I add a new aspect, but lost the name, could you please tell me how to solve it? thanks!

aspectName.png

 

angelborroy
Alfresco Employee

Re: Question about add an aspect

Jump to solution

That should be the "Title" from the content model.

You may find additional information in https://ecmarchitect.com/alfresco-developer-series-tutorials/content/tutorial/tutorial.html

Hyland Developer Evangelist
YanFeiHu
Active Member II

Re: Question about add an aspect

Jump to solution

Thank you so much for your reply.

Actually, I have set the Title as below, is there something else that I missing?

 

<aspects>
   <aspect name="cc:anydownload">
      <title>EveryOne Can DownLoad</title>
      <properties>
      <property name="cc:isActive">
      <type>d:boolean</type>
      <mandatory>true</mandatory>
      <default>false</default>
      </property>
      </properties>
   </aspect>
</aspects>

angelborroy
Alfresco Employee

Re: Question about add an aspect

Jump to solution

You may follow then this instructions I'm copy-pasting from the link I gave you before:

Localizing Strings for Custom Content Models

We’ve put off localizing the form labels until now. To fix this, first create a messages bundle, then register it with a Spring bean. Here are the steps:

  1. Create a new folder called "messages" in $TUTORIAL_HOME/content-tutorial-share/src/main/resources/alfresco/web-extension. If the folder is already there, delete any files that may already be present.
  2. In the messages folder, create a new file called "scModel.properties" with the following content:

    #sc:doc
    type.sc_doc=SomeCo Doc
    assoc.sc_relatedDocuments=Related Documents
    
    #sc:whitepaper
    type.sc_whitepaper=SomeCo Whitepaper
    search.form.desc.sc_whitepaper=Search for SomeCo Whitepapers
    
    #sc:webable
    aspect.sc_webable=SomeCo Webable
    prop.sc_published=Published
    prop.sc_isActive=Active?
    
    #sc:productRelated
    aspect.sc_productRelated=SomeCo Product Related
    prop.sc_product=Product
    prop.sc_version=Version
Hyland Developer Evangelist
YanFeiHu
Active Member II

Re: Question about add an aspect

Jump to solution

Yes! as you say so, it works!

Thanks again!