Adding aspects to Share
Chris Davidson, Consultant 4 Feb 2010
I was look at adding an aspect to Alfresco today. I have done that many times before but today I am using 3.2 and I want to see it in the Share interface.
So I created my aspect in the exampleModel.xml in the Tomcat/shared/ classes/alfresco/extension directory, renamed example-model-context.xml, start up Alfresco and go see if magic happens. It doesn’t, so I fill in the usual web-client-config-custom.xml, now I can see it in Explorer but not Share. So I guess there must be configuration under Share.
So I search for “effectivity” (one of the built in Aspects that does appear in Share out of the box) under the webapps/share and I find the 3 files I need.
\tomcat\webapps\share\WEB-INF\classes\alfresco\web-framework-config-commons.xml \tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\modules\documentlibrary\aspects.get.config.xml \tomcat\webapps\share\WEB-INF\classes\alfresco\site-webscripts\org\alfresco\modules\documentlibrary\aspects.get.properties
web-framework-config-commons.xml – this contains config for the metadata form on a document, hereIi add my properties, there is a force attribute which I am not sure about, maybe for.
<show id="my:partner" for-mode="edit" force="true" />
aspects.get.config.xml – in here i add my aspect to the list of aspects that are visible. There are a couple of empty tags in here addable and removeable, which have no effect when empty but will kick in if you add aspects under them.
<aspect name="my:registerinfo" />
aspects.get.properties – finally add a value here to support internationalisation.
my_registerinfo=Register Info





Comments
Be the first to comment.
Add your comment