I want to add an additional line to the Document Library that displays the content (node) type. In the share-config-custom.xml file, I have the following (note the line index="40"):<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
<metadata-templates>
<template id="default">
<line index="10" id="date">{date}{size}</line>
<line index="20" id="description" view="detailed">{description}</line>
<line index="30" id="tags" view="detailed">{tags}</line>
<line index="40" id="nodeType">Test here {nodeType}</line>
</template>
</metadata-templates>
</config>
<config evaluator="string-compare" condition="DocLibCustom">
<dependencies>
<js src="/alfresco/components/documentlibrary/nodeType_renderer.js"/>
</dependencies>
</config>Using the example from the 4.0 documentation (http://docs.alfresco.com/4.0/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fdoclib-client-side-template-and-action-extensions.html), I created the aforementioned nodeType_renderer.js file in the tomcat\shared\classes\alfresco\site-webscripts\org\alfresco\components\documentlibrary directory with the following code:(function()
{
var $html = Alfresco.util.encodeHTML,
$isValueSet = Alfresco.util.isValueSet;
if (Alfresco.DocumentList)
{
YAHOO.Bubbling.fire("registerRenderer",
{
propertyName: "nodeType",
renderer: function nodeType_renderer(record, label)
{
var jsNode = record.jsNode,
properties = jsNode.properties,
id = Alfresco.util.generateDomId(),
html = "";
return '<span id="' + id + '" class="item">blue: ' + label + jsNode.type + '</span>';
}
});
}
})();When I view the Document Library, I only see the words "Test here". As far as I can tell, there are no errors, so I'm guessing the renderer has not register itself. The documentation does not go into much detail on this. Where should I place the nodeType_renderer.js file and how do I get it to register?Thanks.