AnsweredAssumed Answered

cannot customize share with share-config-custom.xml

Question asked by jackjm on Mar 22, 2012
Latest reply on Mar 27, 2012 by jackjm
Hello all

i wanted to customize the metadata displayed for an articles in the library to show the name of the author instead of the 'modified by' field. Here is what I put into share-config-custom.xml


<config evaluator="string-compare" condition="DocumentLibrary">
        <metadata-templates>
            <template id="customTemplate">
                <line index="10" id="author">{author}</line>
            </template>
        </metadata-templates>
</config>

But share doesn't respect this and default meta-data is rendered. However, if I were to edit the main config file: share-documentlibrary-config.xml; then the author's name is displayed. Obviously, I don't want to be editing the core files; so I would really appreciate any feedback on what the mistake in my code is?

Also, here are some more n00b questions :P

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.

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 upon

3) Is it possible to have different meta-data displayed for spaces and content? If possible, any guidance will be greatly appreciated.

Thanks a lot for your time

p.s: I will put it out there that this is a result of this post. I have created a new post since had I general questions about customizing share. If you think this should be merged; please let me know and I shall merge this post with the earlier one.

Outcomes