Create Nodes create-nodes
Overlay the comment system with a custom version by copying the minimal number of files necessary from /libs
into /apps
and modifying them in /apps
.
Using CRXDE Lite on an author instance, begin by creating a path in the /apps folder which is identical to the path to the overlaid components in the /libs folder.
The path being duplicated is:
/libs/social/commons/components/hbs/comments/comment
Some nodes in the path are folders and some are components.
-
Browse to http://localhost:4502/crx/de/index.jsp
-
Create
/apps/social
(if it does not exist already)- Select
/apps
node - Create > Folder
- Enter Name:
social
- Enter Name:
- Select
-
Select
social
node- Create > Folder
- Enter Name:
commons
- Enter Name:
- Create > Folder
-
Select
commons
node- Create > Folder
- Enter Name:
components
- Enter Name:
- Create > Folder
-
Select
components
node- Create > Folder.
- Enter Name:
hbs
- Enter Name:
- Create > Folder.
-
Select
hbs
node-
Create > Create Component
- Enter Label:
comments
- Enter Title:
Comments
- Enter Description:
List of comments without showing avatars
- Super Type:
social/commons/components/comments
- Enter Group:
Communities
- Click Next until OK
- Enter Label:
-
-
Select
comments
node-
Create > Create Component
- Enter Label:
comment
- Enter Title:
Comment
- Enter Description:
A comment instance without avatars
- Super Type:
social/commons/components/comments/comment
- Enter Group:
.hidden
- Click Next until OK
- Enter Label:
-
Select Save All
-
-
Delete the default
comments.jsp
- Select node
/apps/social/commons/components/hbs/comments/comments.jsp
- Select Delete
- Select node
-
Delete the default comment.jsp
- select node
/apps/social/commons/components/hbs/comments/comment/comment.jsp
- Select Delete
- Select Save All
- select node
Super Type
(property sling:resourceSuperType
) of the overlay components are set to the same value as the Super Type
of the components being overlaid, in this case:social/commons/components/comments
social/commons/components/comments/comment
The overlay’s own Type
(property sling:resourceType
) must be a relative self-reference so that any content not found in /apps is then looked for in /libs.
- Name:
sling:resourceType
- Type:
String
- Value:
social/commons/components/hbs/comments
-
Select the green
[+] Add
- Name:
sling:resourceType
- Type:
String
- Value:
social/commons/components/hbs/comments/comment
- Name:
-
Select the green
[+] Add
- Select Save All