AnsweredAssumed Answered

Unable to change document metadata display, based on document type in Document Library view

Question asked by zputnoky on Jun 26, 2017
Latest reply on Jun 29, 2017 by zputnoky

Dear All,

I try to display different document properties in the document library view, based on the document type.

 

Modified the custom-slingshot-application-context.xml by adding an evaluator:

 

    <bean id="evaluator.doclib.action.isCRTFOLDER" parent="evaluator.doclib.action.nodeType">
        <property name="types">
            <list>
                <value>edlif:CRTFolder</value>
            </list>
        </property>
    </bean>

 

Where the <value> shows on of the custom content type. This was developed with 5.2 model manager

 

Then changed the share-config-custom.xml by:

 

<config evaluator="string-compare" condition="DocumentLibrary">  
    <metadata-templates>     
        <template id="CRTFolder">
        <evaluator>evaluator.doclib.action.isCRTFOLDER</evaluator>
                             
            <banner index="10" id="lockBanner" evaluator="evaluator.doclib.metadata.hasLockBanner">{lockBanner}</banner>
            <banner index="20" id="syncTransientError" evaluator="evaluator.doclib.metadata.hasSyncTransientErrorBanner">{syncTransientError}</banner>
            <banner index="30" id="syncFailed" evaluator="evaluator.doclib.metadata.hasSyncFailedBanner">{syncFailed}</banner>
        
            <line index="20" id="ContractInfo">{edlif_strCONTRACT edlif_strCONTRACT} {edlif_strCONTRACTOR edlif_strCONTRACTOR} </line>
            <line index="30" id="ProjectInfo">{edlif_lovPARK edlif_lovPARK} {edlif_lovLAND edlif_lovLAND} {edlif_lovCOMPLEX edlif_lovCOMPLEX} </line>
        
        </template>
    </metadata-templates>
</config>

 

I created a second evaluator and second definition. When deployed, Alfresco shows the properties defined for the above example, for both types.

 

What I would like to achieve is to show a different set of properties based on the content type.

 

Do you have any advices how to do this?

 

Regards,

Zsolt Putnoky

Outcomes