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>
使用復寫工具將重疊的註解元件推送至發佈執行個體。
更強大的複製形式是在Package Manager中建立包,並 啟用 它。 可匯出和封存套件。
在全域導覽中,選取 工具 > 部署 > 復寫 按一下 激活樹.
對於起始路徑,請輸入 /apps/social/commons
選取 啟動.
如果您以管理員身分登入發佈執行個體(例如,以管理員/管理員身分登入https://localhost:4503/crx/de),即可驗證覆蓋的元件是否位於該處。
如果您登出並重新登入為 aaron.mcdonald@mailinator.com/password
重新整理頁面後,您會看到張貼的留言不再以頭像顯示,而是顯示簡單的「xxx」。