أنت تعرض محتوى المساعدة للإصدار:
- 6.4
- 6.3
- 6.2
- الإصدارات الأقدم
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.
تحذير:
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.
- browse to http://localhost:4502/crx/de/index.jsp
- create /apps/social (if it does not already exist)
- select /apps node
- Create > Folder ...
- enter Name : social
- select social node
- Create > Folder...
- enter Name : commons
- Create > Folder...
- select commons node
- Create > Folder...
- enter Name : components
- Create > Folder...
- select components node
- Create > Folder...
- enter Name : hbs
- 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
- Create > Create Component...
- 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
- Create > Create Component...
- select Save All
- delete the default comments.jsp
- select node /apps/social/commons/components/hbs/comments/comments.jsp
- select Delete
- delete the default comment.jsp
- select node /apps/social/commons/components/hbs/comments/comment/comment.jsp
- select Delete
- select Save All
ملاحظة:
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.
select node /apps/social/commons/components/hbs/comments
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
- select the green [+] Add
select node /apps/social/commons/components/hbs/comments/comment
add another property: - Name: sling:resourceType
- Type: String
- Value: social/commons/components/hbs/comments/comment
- select the green [+] Add
- select Save All
