ÃÛ¶¹ÊÓƵ

Create Nodes create-nodes

CAUTION
AEM 6.4 has reached the end of extended support and this documentation is no longer updated. For further details, see our . Find the supported versions here.

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.

CAUTION
The contents of the /libs folder are never edited because any re-install or upgrade may delete or replace the /libs folder while the contents of the /apps folder is left untouched.

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.

  1. Browse to

  2. Create /apps/social (if it does not already exist)

    • Select /apps node
    • Create > Folder …
      • Enter Name: social
  3. Select social node

    • Create > ¹ó´Ç±ô»å±ð°ù…
      • Enter Name: commons
  4. Select commons node

    • Create > ¹ó´Ç±ô»å±ð°ù…
      • Enter Name: components
  5. Select components node

    • Create > ¹ó´Ç±ô»å±ð°ù….
      • Enter Name: hbs
  6. 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
  7. 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
    • Select Save All

  8. Delete the default comments.jsp

    • Select node /apps/social/commons/components/hbs/comments/comments.jsp
    • Select Delete
  9. Delete the default comment.jsp

    • select node /apps/social/commons/components/hbs/comments/comment/comment.jsp
    • Select Delete
    • Select Save All
NOTE
In order to preserve the inheritance chain, the 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
  1. Select the green [+] Add

    • Name: sling:resourceType
    • Type: String
    • Value: social/commons/components/hbs/comments/comment
  2. Select the green [+] Add

    • Select Save All

chlimage_1-4

recommendation-more-help
5d37d7b0-a330-461b-814d-068612705ff6