Create an aspect in Alfresco Content Model

后端 未结 2 1070
春和景丽
春和景丽 2021-01-06 09:38

I am starting currently using Alfresco CMS. I need to create an \"aspect\" in my content model which must contains a number of properties as:

Aspect: 
    pr         


        
2条回答
  •  长发绾君心
    2021-01-06 09:53

    You should take a look here first. Creating a model in Alfresco is far away from a DB.

    it's just an XML well defined. You have to write the XML first, then initialize it through bootstrap.

    Example XML Model cmodModel.xml:

    
    
    
        
        Custom Model
        Whatever
        1.0
        
        
            
            
            
            
            
        
        
        
            
        
        
        
            
                
                    
                        value 1
                        value 2
                    
                
            
            
                
                    
                        value 1
                        value 2
                    
                
            
         
        
            
            
                Document
                Document
                cm:content
                
                    cmod:aspectBase
                    cmod:aspectFormat
                    cmod:aspectMetadata
                
            
     
        
        
            
                Aspect base properties
                
                    
                        p1
                        p1
                        d:text
                    
                    
                        p2
                        p2
                        d:int
                    
                    
                        p3
                        p3
                        d:int
                    
                    
                        p4
                        p4
                        d:text
                    
                
            
            
                Aspect Format
                
                    
                        fp1
                        fp1
                        d:int
                    
                    
                        fp2
                        fp2
                        d:int
                    
                    
                        fp3
                        fp3
                        d:int
                    
                
            
            
                Aspetto Metadata
                
                    
                        mp1
                        mp1
                        d:text
                        
                            
                        
                    
                    
                        mp2
                        mp2
                        d:text
                        
                            
                        
                    
                    
                        mp3
                        mp3
                        d:boolean
                    
                
            
    
    
    

    model context named cmod-model-context.xml

    
    
    
    
        
        
            
                
                    alfresco/extension/model/cmodModel.xml
              
            
        
    
    
    

    Hope it helps.

提交回复
热议问题