cancel
Showing results for 
Search instead for 
Did you mean: 

Change name/title displayment for custom nodes in th doclist

webdesigner
Champ in-the-making
Champ in-the-making
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: <fooSmiley Tonguerop1>(<fooSmiley Tonguerop2>)
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="cmSmiley Surprisedwner">
                    <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
11 REPLIES 11

afaust
Legendary Innovator
Legendary Innovator
Hello,

I am talking about the Share document library customization options of Alfresco 4.x, which include the definition of how metadata is displayed for a node in the document list.
"Custom" in this context implies that the renderer would need to be implemented. I am not aware of any community projects that might provide pre-packaged renderers. A custom renderer is simply a piece of JavaScript code registered via the "registerRenderer" event.

Regards
Axel

sharifu
Confirmed Champ
Confirmed Champ
can you provide example of how to do it exactly please. what files to change and what exactly on 4.0d and 4.2.c.