Steve Castledine December 5 2006 06:07:00 AM
The Lotus Notes blog template allows us to highlight comments entered by the content author's. I have this setup on this site (see right).
To do this is quite straightforward. First of all we need to tell the system the email address's of the content authors. Then we setup an alternative "Item Template" for the system to use for these authors.
Setup email address of author
So that the database can handle multiple authors, you need to add profile documents for each author of the system under the section "Configuration" - "User Profiles". Each User profile has a field for an email address. The system will use that email address to check against comments to decide whether to format as an "Author" comment.
To save some processing when the website is displayed, some of this is done when you create content. So if you add an email address after content is created it will not pick up this address.
Create a secondary "Comment Item Template"
Each comment's formatting within the site is controlled by the default comment "Item Template". From the default blog template we need to copy the default document ("Comment Item") and give it a name such as "Author Comment Item".
We then edit this template to create a unique look for comments that are added by the author. I have used the following html. You can be more creative and not so lazy as I have included the style information directly in the html.
<div style="border:1px dashed black;background-color:#ADD8E6;margin-bottom:10px;"><div class="commentbody"><$DXCommentNumber$>) <strong><$DXCommentSubject$></strong></div>
<div class="commentauthor"><strong><$DXCommentAuthor$></strong> <$DXCommentCreation$></div>
Telling the system to use the new "Author Comment Item" template
We now need to tell the system to use the new template we created above. We do this within the configuration document under tabs "Templates" - "Comments" - "Comments". We use the field "Author Comment List Template" to select the new template we created.
After we completed the above, if we use the email address specified in our user profile document when we add comments, we will see results like this:
- Comments