Content Services (ECM)
Process Services (BPM)
Application Development Framework
Digital Business Platform
Announcements & Opportunities
Alfresco Ambassador Program
Alfresco Content Services (ECM)
to create and rate content, and to follow, bookmark, and share content with other members. Not a member?
how to add custom aspects in WCM
Question asked by
on May 6, 2009
on May 7, 2009 by ebell
Show 0 Likes
Can anyone help me out in finding a way to add custom aspects for a content in WCM (i.e., in a webproject)
No one else has this question
Mark as assumed answered
This content has been marked as final.
Show 1 comment
(Required, will not be published)
May 7, 2009 2:30 PM
Hopefully this will give you some general guidance. It's a guide I created for personal use:
Custom Content Creation in Alfresco is managed by creating .xml and .properties files in the $JBOSS_HOME/server/default/conf/alfresco/extension folder.
Required files are the following:
* ___-model-context.xml (A file defining the context for your model)
o Creates a customized spring bean by extending the existing dictionary
o Includes a call to include your file __Model.xml
o Allows you to define the name, description, author, and version of the model as custom meta-data for the model
o Must import Alfresco Dictionary Definitions (<import uri="
" prefix="d" />) and Alfresco Content Domain Model Definitions (<import uri="
" prefix="cm" />)
o Should introduce the new namespace defined by the model (<namespace uri="
" prefix="bl" />)
o When defining data types, it's recommended to go ahead and create an enterprise-wide generic data type, in case features are needed across types you've created.
o Each type is creamed with the following declaration form:
+ <type name="bl:doc">
<title>Burris Logistics Document</title>
o In addition to types, this file also contains any aspects that you'll need. (Think interfaces / fields)
+ Here's an example of creating an expireable aspect with two properties, a boolean and a date
+ <aspect name="bl:expireable">
o In order to correctly configure both your types and aspects, they must be added to the appropriate portions of the web-client interface. Here are the portions:
+ The custom aspect properties must be added to the property sheet
# <config evaluator="aspect-name" condition="bl:expireable">
<show-property name="bl:expired" display-label-id="expired" read-only="true"/>
<show-property name="bl:expirationdate" display-label-id="expirationdate"/>
+ The custom types must be added to the content type list
# <config evaluator="string-compare" condition="Content Wizards">
+ The list of aspects to the add/remove features action
# <config evaluator="string-compare" condition="Action Wizards">
# The custom types must be added to the specialise type action
<type name="bl:atr" />
+ The custom types and custom properties must be added to the advanced search query
# <config evaluator="string-compare" condition="Advanced Search">
<meta-data aspect="bl:expireable" property="bl:expired" display-label-id="expired" read-only="true"/>
<meta-data aspect="bl:expireable" property="bl:expirationdate" display-label-id="expirationdate" />
o This file configures the text that appears next to the fields for the custom aspect on the web-client interface
o Fields must be configured for each custom aspect. Here's an example:
* When changing any of these files, shutdown and restart JBoss.
* Additionally, before adding mandatory meta-data aspects, make sure no existing content of the modified type exists, or you will force all existing content of that type into a state where it can not be deleted, as it does not contain the mandatory aspect fields.
* If encountering difficulty in compiling the .xml files, open them in an internet browser, and ensure that the .xml code passes through the browser correctly. This should help debug errors presented when Alfresco is started.
Show 0 Likes
Retrieving data ...
LDAP configuration ERROR (PARSE TIME)
Generating an app with Angular CLI and preparing it for use with ADF 1.9.0
Workflow in share and alfresco
Get task forms from RuntimeEventListener implementation
Deploying Alfresco Content Services Community Edition 201806 GA