cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about configuration files and custom models

vincent_roye
Champ in-the-making
Champ in-the-making
Hi,

Today I managed to configure the someco model. However I have a few questions :

- what is the file : web-client-config-custom.xml for ? I didn't put it and it's working.
- What's the link between a type and an aspect ? Do I always have to create a type to create an aspect ?
- How can I change the display property name when in the share interface when I click on "Edit properties" ?

Thank you very much,

Vincent
5 REPLIES 5

vincent_roye
Champ in-the-making
Champ in-the-making
I also would like to know if the aspect definition depends on the namespace.

I am trying to remove some aspects of the example (webable and productRelated) but it's not working. I don't it's because of the namespace.

Thanks

rjohnson
Star Contributor
Star Contributor
1. web-client-config-custom.xml is for the Alfresco web client, I'm guessing you are using Share
2. There is no link between a document type and an aspect, thats the point aspects are cross type so, for example the geoloaction aspect can be added to any document type and it will then allow you to enter a Lat / Long in the metadata
3. You override it in the .properties file. This is more comlex to explain but basically make your own .properties, include it using custom-slingshot-application-context.xml and then add the same message key to this custom file as the one you want to override, restart Alfresco and bingo, new label.

Thank you Bob. !

I have one more question. I have a specific kind of PDF files in a shared folder called FDP. I would like to define a type "denunciation" for these documents. Where and how can I do that ?
I would like to attribute my newly created aspect "denunciation number" only to this type. Where can I configure that ?
Thanks a lot for your help

rjohnson
Star Contributor
Star Contributor
To create a custom type you need to create a custom model. There is a good tutorial on this by Jeff Potts which tells you what to do in some detail (I think there is a V1 and V2 - you want V2).

Basically, you define your type in a {your-model-name)-model.xml file, include it by creating and referencing in in {your-model-name}-model-context.xml, making it visible by adding it to share-config-custom.xml and restarting Alfresco. You can then make any document this "type" using the "Change type" on the document details page.

Following on from my previous comment that aspects are designed to be cross type, it would be complicated to make your aspect "for "denunciation" documents only". Now you could go through the pain of not making it a visible aspect and creating a special action on document details to add it which is only visible if the document on display is "denunciation" or you could make it not a visible aspect and make it a mandatory aspect of your denunciation type.

Frankly, this goes against the theory of aspects and I suspect you will end up fighting Alfresco to make this function as you require in the long run. Really if you want certain metadata only on a certain type of document then you should just include the definition of that metadata in the custom model for that document and then you don't need the aspect at all.

Simple - easy to remember.