Du viser støtteinnhold for versjon:

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.

Forsiktig!

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 idential 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 http://localhost:4502/crx/de/index.jsp
  2. create /apps/social (if it does not already exist)
    • select /apps node
    • Create > Folder ...
      • enter Name : social
  3. select social node
    • Create > Folder...
      • enter Name : commons
  4. select commons node
    • Create > Folder...
      • enter Name : components
  5. select components node
    • Create > Folder...
      • 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
  1. delete the default comments.jsp
    • select node /apps/social/commons/components/hbs/comments/comments.jsp
    • select Delete
  2. delete the default comment.jsp
    • select node /apps/social/commons/components/hbs/comments/comment/comment.jsp
    • select Delete
  • select Save All

Merk:

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.

  1. select node /apps/social/commons/components/hbs/comments
  2. in the entry area at the bottom of the Properties tab, type the following values for a new property:
    • Name: sling:resourceType
    • Type: String 
    • Value: social/commons/components/hbs/comments
  3. select the green  [+] Add
  4. select node /apps/social/commons/components/hbs/comments/comment
  5. add another property:
    • Name: sling:resourceType
    • Type: String 
    • Value: social/commons/components/hbs/comments/comment
  6. select the green  [+] Add
  • select Save All
chlimage_1

Dette produktet er lisensiert i henhold til Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Innlegg på Twitter™ og Facebook dekkes ikke av Creative Commons-vilkår.

Juridiske merknader   |   Regler for personvern på nettet