建立子註解元件
這些方向將 群組 設定為.hidden
,因為只有父元件應包含在頁面中。
刪除自動建立的JSP檔案是因為會改用預設的HBS檔案。
-
導覽至
/apps/custom/components/comments
節點 -
以滑鼠右鍵按一下節點
-
選取 建立 > 元件……
- 標籤: 註解
- 標題: 替代註解
- 描述: 替代註解樣式
- 超級型別: social/commons/components/hbs/comments/comment
- 群組:
*.hidden*
-
選取 下一步
-
選取 下一步
-
選取 下一步
-
選取 確定
-
-
展開已建立的節點:
/apps/custom/components/comments/comment
-
選取 全部儲存
-
用滑鼠右鍵按一下
comment.jsp
-
選取 刪除
-
選取 全部儲存
-
複製
comments.hbs
-
編輯
comments.hbs
至:-
變更
data-scf-component
屬性的值(~第20行):- 來自
social/commons/components/hbs/comments
- 至
/apps/custom/components/comments
- 來自
-
修改以包含自訂註解元件(第75行):
- 取代
{{include this resourceType='social/commons/components/hbs/comments/comment'}}
- 與
{{include this resourceType='/apps/custom/components/comments/comment'}}
- 取代
-
-
複製
comment.hbs
-
編輯
comment.hbs
至:-
變更data-scf-component屬性的值(~第19行)
- 來自
social/commons/components/hbs/comments/comment
- 至
/apps/custom/components/comments/comment
- 來自
-
-
選取
/apps/custom
節點 -
選取 全部儲存