comment.hbs脚本负责为每个注释创建整体HTML。
要在每个已发布评论旁边不显示头像,请执行以下操作:
复制 comment.hbs
从 libs
to apps
/libs/social/commons/components/hbs/comments/comment/comment.hbs
/apps/social/commons/components/hbs/comments/comment
打开覆盖的 comment.hbs
comment.hbs
in /apps/social/commons/components/hbs/comments/comment folder
找到以下行,并删除或注释它们:
<aside class="scf-comment-author">
<img class="scf-comment-avatar {{#if topLevel}}withTopLevel{{/if}}" src="{{author.avatarUrl}}"></img>
删除线条,或在线条周围设置 <!--
和 -->
去评论一下。 此外,还会添加字符“xxx”作为头像所在位置的视觉指示器。
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>
使用复制工具将覆盖的评论组件推送到发布实例。
一种更为可靠的复制形式是在包管理器和 激活 它。 可以导出和存档资源包。
在全局导航中,选择 工具 > 部署 > 复制 单击 激活树.
对于开始路径,输入 /apps/social/commons
选择 激活.
如果您以管理员身份登录发布实例,例如以管理员/管理员身份登录https://localhost:4503/crx/de ,则可以验证覆盖的组件是否位于此处。
如果您注销,并重新登录为 aaron.mcdonald@mailinator.com/password
刷新页面后,您会发现发布的评论不再显示为头像,而是显示一个简单的“xxx”。