As we transition to the new Hyland Community, some post links may be temporarily disrupted as we finalize redirects. We apologize for the inconvenience and are working to resolve this as quickly as possible. Details.
<config evaluator="string-compare" condition="DocumentLibrary" replace="true"> <!– Default (fallback) –> <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="categories" view="detailed" evaluator="evaluator.doclib.metadata.hasCategories">{categories}</line–> <!–line index="50" id="social" view="detailed">{social}</line–> </template> </metadata-templates> </config>
<!– Modified & Social –> <div> <#assign modifyUser = node.properties["cm:modifier"]> <#assign modifyDate = node.properties["cm:modified"]> <#assign modifierLink = userProfileLink(modifyUser.userName, modifyUser.displayName, 'class="theme-color-1"') > ${msg("label.modified-by-user-on-date", modifierLink, "<span id='${id}-modifyDate'>${modifyDate.iso8601}</span>")} <#if showFavourite == "true"> <span id="${id}-favourite" class="item item-separator"></span> </#if> <#if showLikes == "true"> <span id="${id}-like" class="item item-separator"></span> </#if> <#if showComments == "false"> <span class="item item-separator item-social"> <a href="#" name="@commentNode" rel="${nodeRef?js_string}" class="theme-color-1 comment ${id}" title="${msg("comment.${itemType}.tip")}" tabindex="0">${msg("comment.${itemType}.label")}</a><#if commentCount??><span class="comment-count">${commentCount}</span></#if> </span> </#if> <#if showQuickShare == "false"> <span id="${id}-quickshare" class="item item-separator"></span> </#if> </div>
<!–Remove Node-Header Details–> <component> <scope>template</scope> <region-id>node-header</region-id> <source-id>document-details</source-id> <sub-components> <sub-component id="default"> <evaluations> <evaluation id="rm-nodeHeader"> <url>/components/node-details/node-header</url> <properties> <nodeRef>{nodeRef}</nodeRef> <rootPage>documentlibrary</rootPage> <rootLabelId>path.fileplan</rootLabelId> <showFavourite>false</showFavourite> <showLikes>false</showLikes> <showComments>false</showComments> <showQuickShare>false</showQuickShare> </properties> </evaluation> </evaluations> </sub-component> </sub-components> </component>
I can't find anything about sub-components of the document-details view. Is there a tutorial for a module available?
<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js"> function main() { AlfrescoUtil.param("nodeRef"); AlfrescoUtil.param("site", null); AlfrescoUtil.param("rootPage", "documentlibrary"); AlfrescoUtil.param("rootLabelId", "path.documents"); AlfrescoUtil.param("showFavourite", "true"); AlfrescoUtil.param("showLikes", "true"); AlfrescoUtil.param("showComments", "false"); AlfrescoUtil.param("showQuickShare", "true"); AlfrescoUtil.param("showDownload", "true"); AlfrescoUtil.param("showPath", "true"); var nodeDetails = AlfrescoUtil.getNodeDetails(model.nodeRef, model.site); if (nodeDetails) { model.item = nodeDetails.item; model.node = nodeDetails.item.node; model.isContainer = nodeDetails.item.node.isContainer; model.paths = AlfrescoUtil.getPaths(nodeDetails, model.rootPage, model.rootLabelId); model.showQuickShare = (!model.isContainer && model.showQuickShare && config.scoped["Social"]["quickshare"].getChildValue("url") != null).toString(); model.showComments = ((nodeDetails.item.node.permissions.user["CreateChildren"] || false) && model.showComments).toString(); model.showDownload = (!model.isContainer && model.showDownload).toString(); var count = nodeDetails.item.node.properties["fm:commentCount"]; model.commentCount = (count != undefined ? count : null); // Widget instantiation metadata… var likes = {}; if (model.item.likes != null) { likes.isLiked = model.item.likes.isLiked || false; likes.totalLikes = model.item.likes.totalLikes || 0; } var nodeHeader = { id : "NodeHeader", name : "Alfresco.component.NodeHeader", options : { nodeRef : model.nodeRef, siteId : model.site, rootPage : model.rootPage, rootLabelId : model.rootLabelId, showDownload : Boolean(model.showDownload), showPath : Boolean(model.showPath), displayName : (model.item.displayName != null) ? model.item.displayName : model.item.fileName, isFavourite : Boolean(model.item.isFavourite || false), isContainer : Boolean(model.isContainer), sharedId: model.item.node.properties["qshare:sharedId"] || null, sharedBy: model.item.node.properties["qshare:sharedBy"] || null } }; model.widgets = [nodeHeader]; } } main();
for (var i=0; i<model.widgets.length; i++) { if (model.widgets[i].id == "NodeHeader") { model.widgets[i].options.showLikes = false; } }
<import resource="classpath:/alfresco/templates/org/alfresco/import/alfresco-util.js"> for (var i=0; i<model.widgets.length; i++) { if (model.widgets.id == "NodeHeader") { if(model.widgets.options.nodeRef!=null) { var nodeDetails = AlfrescoUtil.getNodeDetails(model.nodeRef, model.site); // var jsNode = new Alfresco.util.Node(model.widgets.options.nodeRef); if(model.widgets.options.node.hasAspect("custom:customAspect")){ model.widgets.options.showFavourite = false; model.widgets.options.showLikes = false; } } } }