AnsweredAssumed Answered

Change name/title displayment for custom nodes in th doclist

Question asked by webdesigner on Mar 16, 2012
Latest reply on Sep 18, 2013 by sharifu
Hello,

I need to do a very simple modification for my custom content types.

In the DocumentLibrary (simple/detailed) view all content and space nodes are displayed using following format:

1. LINE: <cm:name>(<cm:title>)
2. LINE <cm:description>
etc….


For nodes having my custom aspect I need to display instead of cm:name (cm:title) another properties (from my custom model) .

Something like:
1. LINE: <foo:prop1>(<foo:prop2>)
etc….

I've tried to use metadata-templates, but it's used only for the lines below of the name/title (beginning with line 2 in my example).

I've found the propertyDecorator approach, but it doesn't work for cm:name for some reason:
Here my bean definition (see customNamePropertyDecorator below):
<bean id="applicationScriptUtils" parent="baseJavaScriptExtension" class="org.alfresco.repo.jscript.ApplicationScriptUtils">
        <property name="extensionName">
            <value>appUtils</value>
        </property>
        <property name="serviceRegistry">
            <ref bean="ServiceRegistry"/>
        </property>
        <property name="decoratedProperties">
            <map>
                <entry key="cm:creator">
                    <ref bean="usernamePropertyDecorator"/>
                </entry>
                <entry key="cm:modifier">
                    <ref bean="usernamePropertyDecorator"/>
                </entry>
                <entry key="cm:workingCopyOwner">
                    <ref bean="usernamePropertyDecorator"/>
                </entry>
                <entry key="cm:lockOwner">
                    <ref bean="usernamePropertyDecorator"/>
                </entry>
                <entry key="cm:owner">
                    <ref bean="usernamePropertyDecorator"/>
                </entry>
                <entry key="cm:taggable">
                   <ref bean="tagPropertyDecorator"/>
                </entry>
                <entry key="cm:categories">
                   <ref bean="categoryPropertyDecorator"/>
                </entry>
                <!– Own decorators –>
                <entry key="cm:name">
                   <ref bean="customNamePropertyDecorator"/>
                </entry>
          …..


Can you please point me how to do it using Standard Extension points?

Best regards and thanks in advance
Vitali

Outcomes