03-22-2012 02:02 PM
<config evaluator="string-compare" condition="DocumentLibrary">
<metadata-templates>
<template id="customTemplate">
<line index="10" id="author">{author}</line>
</template>
</metadata-templates>
</config>
03-23-2012 12:25 PM
1) If I were to add some text to indicate the field, say: Author: ${author}, then it is displayed in the reverse order as- 'XYZName Author: ' Suggestions on why this is happenning.The syntax for doing that is:
<line index="10" id="author">{my:author label.my_author}</line>
2) say I wanted this line to be not displayed at all if the author name is blank; how would I go about doing it? From MikeH's blog post, I realize I might need to write a custom evaluator to make this happen; but my knowledge ends there; are there any working sequence of steps that I can first try and build uponYou are right, you need a custom evaluator for that. So your code would look like:
<line index="10" id="author" evaluator="evaluator.doclib.metadata.hasAuthor">
{my:author label.my_author}
</line>
If I'm not mistaken, you define your custom evaluators in custom-slingshot-application-context.xml located at tomcat/shared/classes/alfresco/web-extension/. There are some predefined evaluators you can use as parent for your custom evaluator. In your case you could use the evaluator.doclib.action.propertyNotNull evaluator.
<bean id="evaluator.doclib.metadata.hasAuthor" parent="evaluator.doclib.action.propertyNotNull">
<property name="property">
<value>my:author</value>
</property>
</bean>
3) Is it possible to have different meta-data displayed for spaces and content? If possible, any guidance will be greatly appreciated.I think that is possible using evaluators. For example you have the evaluator.doclib.action.nodeType evaluator that will display the metadata only if the node matches a certain node type.
03-27-2012 11:55 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.