
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-12-2016 05:21 AM
Hi,
I want to add a custom values (metadata fields) to standard type in Alfresco. I tried to add custom types in model, with all metadata that I need, but still after adding file, I have to manually change type so Alfresco will show me my custom fileds of metadata. This is how it looks now:
I have some metadata in Models/Custom Types:
So if I add a file (to sites/document library), I have to change type, so alfresco shows me my custom metadata:
Then metadata could be filled:
But I want my custom metadata fields to be added for all files, which I put to Alfresco like that:
But without changing file types in first place. For example that all added files will have automatically set type to my custom one or to add my metadata to default file type. How can I do that?
- Labels:
-
Archive
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2016 04:16 AM
1. you might need to create 2 rules on 'User Homes' and your 'Sites' and check the 'apply to subfolders'
2. you need to make your type visible in share: Share configuration for custom types and properties | Alfresco Documentation
3. you can do that, but as Douglas C. R. Paes​ already pointed out, thats probably not what you want. it can lead to problems.
1 thing to know about specializing an item is => you can not 'unspecialize' it once its in the repo. and your users can potentially upload anything.
do you want 1000 jpeg's of somebodies cat with your special type? i don't think so.
create a strict rule that only applies your type to the files that really need it.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2016 08:07 AM
I don't have XML setting files, which are mentioned there (projects\repository\config\alfresco\model\contentModel.xml). Is there some step-by-step guide? Where to go, what file edit, what to do in repository? I know how to edit file, but I can't find the file to edit, and I don't know how to start
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2016 09:31 AM
Hey Tomasz Szymański​
Have you created a project following the tutorial instructions?
You will find that path inside the default project's folder structure when you create it using the Alfresco SDK.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-17-2016 09:33 AM
Tomasz Szymański​ Sorry, I forgot to post the tutorial's link Working With Custom Content Types in Alfresco | ECMArchitect | Alfresco Developer Tutorials
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2016 10:40 AM
Instead of adding new by specializing the object's type, you could create new aspects with the required fields and then attach the aspect to new nodes using the same folder rule idea.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-14-2016 12:09 PM
Have you thought of using Behaviors? There are hooks for beforeCreateNode, onCreateNode etc.
Behaviours / Policies | Alfresco Documentation
Jeff also has an excellent turorial.
Implementing Custom Behaviors in Alfresco | ECMArchitect | Alfresco Developer Tutorials

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-20-2016 02:50 AM
Thank you all for your help - it cleared out a lot. I decided to use rule to add an aspect to file - not change type. Right now i"m testing this solution.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎10-26-2016 05:39 AM
I used the Markus Joos​ solution, and used aspects and rules in folders. It works very good, the only problem i've got is unability to edit an acive model, but I posted separate subject about that. Thaks once again for help!
