Alter the Appearance alter-the-appearance
Modify the Script modify-the-script
The comment.hbs
script is responsible for creating the overall HTML for each comment.
To not display the avatar next to each posted comment:
-
Copy
comment.hbs
fromlibs
toapps
- Select
/libs/social/commons/components/hbs/comments/comment/comment.hbs
- Select Copy
- Select
/apps/social/commons/components/hbs/comments/comment
- Select Paste
- Select
-
Open the overlaid
comment.hbs
- Double-click node
comment.hbs
in/apps/social/commons/components/hbs/comments/comment folder
- Double-click node
-
Find the following lines and either delete or comment them out:
<aside class="scf-comment-author">
<img class="scf-comment-avatar {{#if topLevel}}withTopLevel{{/if}}" src="{{author.avatarUrl}}"></img>
Either delete the lines, or surround them with <!--
and -->
so you comment them out. Also, the characters ‘xxx’ are being added as a visual indicator of where the avatar would have been.
xxx
<!-- do not display avatar with comment
<aside class="scf-comment-author">
<img class="scf-comment-avatar {{#if topLevel}}withTopLevel{{/if}}" src="{{author.avatarUrl}}"></img>
Replicate the Overlay replicate-the-overlay
Push the overlaid comments component to the publish instance using the Replication Tool.
From the global navigation, select Tools > Deployment > Replication and click Activate Tree.
For the Start Path, enter /apps/social/commons
and select Activate.
View Results view-results
If you log on to the publish instance as an administrator, for example, https://localhost:4503/crx/de as admin/admin, you can verify that the overlaid components are there.
If you log off and then log on as aaron.mcdonald@mailinator.com/password
and refresh the page, you observe that an avatar is not display with the posted comment. Instead, a simple ‘xxx’ is displayed.