AnsweredAssumed Answered

Edit-metadata within document-details

Question asked by dsmith on Mar 31, 2015
Latest reply on Apr 2, 2015 by rjohnson
Alfresco version: 5.0.c Community

I have some custom content types that need to be indexed by hand via metadata.  The documents are handwritten so the users need to be able to see the document while they edit the metadata.

When I was first getting my head around Alfresco, I accomplished this by directly editing document-details.xml and document-details.ftl, see <a href="">here</a>.

But I want to do this the right way (or "a" right way, if there are multiple approaches), so that upgrades don't blow away my customizations.

So currently, I've been following the gist of blog post <a href="">here</a>, and have created a maven share tier project with the file my-share-project-document-details.xml in my-share-project/src/main/amp/config/alfresco/web-extension/site-data/extensions with the following code:

            <id>MCRD - Document Details Page</id>
            <evaluator type="default.extensibility.evaluator"/>
                                    <sub-component id="edit-metadata-mgr" index="2">
                                                    <evaluation id="mcrd-edit-metadata-mgr">
                                    <sub-component id="edit-metadata" index="3">
                                                    <evaluation id="mcrd-edit-metadata">

After activating the module in Share, everything works as expected - the edit properties region shows up alongside the document preview and can be edited and saved.

But I feel like I've accomplished this without knowing exactly what I'm doing or how I'm doing it.  Can anyone confirm that this is a correct way to go about accomplishing my goal or suggest a better way if it's not?

Also, I'm curious what I'd do if I wanted to get a little deeper into customizing the document details.  What if I wanted to adjust the column spacing or create a region for the edit-metadata component, rather than making it a sub-component of document-actions?  I know could directly edit document-details.ftl in the running instance, but how would I accomplish this in the SDK?  I'm working my way through the documentation, but I'm a little overwhelmed by how many ways there are to go about it and wondering if anyone can recommend some reading material more geared toward one approach.