cancel
Showing results for 
Search instead for 
Did you mean: 

Adding custom categories

dd090
Champ in-the-making
Champ in-the-making
Hi,

I want to add some custom categories to our existing alfresco application.
I would prefer to do this in a way that I can do this only once (I mean not via the admin gui) and not via an sql script which adds these in the database.

Is there any way to do this ?


I tried to add our custom categories to the categories.xml as a new child of cm:generalclassifiable but when i restart the application i do not see my new categories.
What am i doing wrong ?
Any help (or other ideas on how to do this) would be greatly appreciated.

An example of my categories.xml attempt to add new categories :


<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0"
           xmlns:sys="http://www.alfresco.org/model/system/1.0"
           xmlns:cm="http://www.alfresco.org/model/content/1.0">

   <cm:category_root view:childName="cm:categoryRoot">
        <view:acl>
            <view:ace view:access="ALLOWED">
                <view:authority>guest</view:authority>
                <viewSmiley Tongueermission>Read</viewSmiley Tongueermission>
            </view:ace>
        </view:acl>
      <cm:name>categories</cm:name>
      <cm:categories>

         <!– Software Document Classification –>
         <cm:category view:childName="cm:generalclassifiable">
                <cm:name>General</cm:name>
            <cm:subcategories>
                <cm:category>
            <cm:name>Software Document Classification 2</cm:name>
            <cm:subcategories>
               <cm:category>
                  <cm:name>Software Descriptions</cm:name>
                  <cm:subcategories>
                     <cm:category>
                        <cm:name>Main Software Descriptions</cm:name>
                        <cm:subcategories>
                           <cm:category>
                              <cm:name>Short System Description</cm:name>
                           </cm:category>
                           <cm:category>
                              <cm:name>Requirement Description</cm:name>
                           </cm:category>
                           <cm:category>
                              <cm:name>Architecture Description</cm:name>
                           </cm:category>
                           <cm:category>
                              <cm:name>Implementation Description</cm:name>
                           </cm:category>
                           <cm:category>
                              <cm:name>Configuration Description</cm:name>
                           </cm:category>
                           <cm:category>
                              <cm:name>David Was Here</cm:name>
                           </cm:category>                           
                        </cm:subcategories>
                     </cm:category>
            </cm:subcategories>
             </cm:category>
            
            
         <!– DDS TAA clasifications –>
         <!– TODO DDS What about translations –>
         <cm:category>
                <cm:name>TAA</cm:name>
            <cm:subcategories>
                   <cm:category>

                  <cm:name>Onroerend Goed</cm:name>
                  <cm:subcategories>
                     <cm:category>
                        <cm:name>BasisAkte</cm:name>
                     </cm:category>
                     <cm:category>
                        <cm:name>Huurkontrakt</cm:name>
                     </cm:category>               
                  </cm:subcategories>
               </cm:category>                  
                   <cm:category>
                  <cm:name>Krediet</cm:name>
                  <cm:subcategories>
                     <cm:category>
                        <cm:name>Kredietopening</cm:name>
                     </cm:category>
                  </cm:subcategories>
               </cm:category>
                   <cm:category>
                  <cm:name>Familiale Akte</cm:name>
                  <cm:subcategories>
                     <cm:category>
                        <cm:name>Huwelijskontrakt</cm:name>
                     </cm:category>
                     <cm:category>
                        <cm:name>Testament</cm:name>
                     </cm:category>
                  </cm:subcategories>
               </cm:category>
                   <cm:category>
                  <cm:name>Vennootschap</cm:name>
                  <cm:subcategories>
                     <cm:category>
                        <cm:name>Oprichting vennootschap</cm:name>
                     </cm:category>
                  </cm:subcategories>
               </cm:category>                                                                                                                     
            </cm:subcategories>   
         </cm:category>
7 REPLIES 7

jbarmash
Champ in-the-making
Champ in-the-making
categories.xml is only loaded once, upon the initial startup / bootstrapping of the server.   You have two options:

1.  Delete the db / file system and start the server with the new categories.xml - that should make your
2. Package up your categories as a part of a module, and bootstrap it as part of that module. 

This page has a bit more information about categories (although some of it is a bit too detailed for what you need). 

http://wiki.alfresco.com/wiki/Classification_And_Categories

dd090
Champ in-the-making
Champ in-the-making
Thanks jbarmash.
I did not clean the database. That was my missing link.

maraki
Champ in-the-making
Champ in-the-making
Hello!

I try to do the same thing… but  I do not see my new categories.
Could you give me some more information about how I can clean the database?

Thanks in advance!

dd090
Champ in-the-making
Champ in-the-making
This depends on the database you are using.
Try dropping it completely (the database). Alfresco should re-create it upon next restart (like it did during first install) or there should be a script somewhere to re-create it.

Hope this helps.

maraki
Champ in-the-making
Champ in-the-making
Thanks for your help.
I use MySQL.
I coundn't found how to drop the database.

Finally I found another way that works, by re-instaling tomocat, but I would interested in founding how to drop or clean the database.
I would appreciate it, if you had any further information about the above or if you could specify the path of the database.

jbarmash
Champ in-the-making
Champ in-the-making
in INSTALLATION\extras\databases\mysql\ of tomcat directory, we have db_remove.sql (and correpsonding .bat file on windows).  It drops the database from MySQL.  After that, to recreate the db, run db_setup.sql or .bat file.

emrbridge
Champ in-the-making
Champ in-the-making
I am new to Alfresco and have set up my basic structure but am unable to set up custom categories.  There is nothing on Alfresco Help that I can find.  There are lots of exchanges/posts on the forum but nothing that shows how to add custom categories using the admin gui.  Can you please tell me how to do it or where the instructions reside.  If you cannot do it through the admin gui, then please push me to instructions on how to do it on the backend.

Thank you,

Jay