You're viewing help content for version:

Custom Site Template

A custom site template may be specified separately for each language copy of a community site.

To do so,

  • create a custom template
  • overlay the default site template path
  • add the custom template to the overlay path
  • specify the custom template by adding a page-template property to the configuration node

Default template:

/libs/social/console/components/hbs/sitepage/sitepage.hbs

Custom template in overlay path :

/apps/social/console/components/hbs/sitepage/<template-name>.hbs

 Property : page-template
       Type : String
      Value : <template-name> (no extension)

Configuration node :

/content/<community site path>/<lang>/configuration

for example : /content/sites/engage/en/configuration

Note:

All nodes in the overlaid path need only be of type Folder.

Caution:

If the custom template is given the name sitepage.hbs, then all community sites will be customized.

Custom Site Template Example

As an example, vertical-sitepage.hbs is a site template that results in the placement of menu links vertically down the left side of the page, instead of horizontally below the banner.

Download

Place the custom site template in the overlay folder :

/apps/social/console/components/hbs/sitepage/vertical-sitepage.hbs

Identify the custom template by adding a page-template property to the configuration node : 

/content/sites/sample/en/configuration

chlimage_1

Be sure to Save All and replicate custom code to all AEM instances (custom code is not included when the community site content is published from the console).

The recommended practice for replicating custom code is to create a package and deploy it on all instances.

Exporting a Community Site

Once a community site is created, it is possible to export the site as an AEM package stored in package manager and available for download and upload.

This is available from the Communities Sites console.

Note that UGC and custom code is not included in the community site package.

To export UGC, use the AEM Communities UGC Migration Tool, an open source migration tool available on GitHub.

Deleting a Community Site

Caution:

Presently, there is no official method for deleting a community site

There is no guarantee for the results of using the information in this section.

During development, if it is desired to delete a community site and start fresh, until the delete feature is fully developed, these must be removed separately :

Community Unique Site ID

To identify the unique site ID associated with the community site, using CRXDE :

  • navigate to the language root of the site, such as
    /content/sites/<site name>/en/rep:policy
  • find the allow<#> node with a rep:principalName in this format :
    • rep:principalName = community-enable-nrh9h-members
  • the site ID is the 3rd component of rep:principalName
    for example, if rep:principalName = community-enable-nrh9h-members
    • site name = enable
    • site IDnrh9h
    • unique site ID = enable-nrh9h

User Generated Content

Obtain the communities-srp-tools project from Github :

This contains a servlet to delete all UGC from any SRP.

All UGC may be removed or for a specific site, for example :

  • path=/content/usergenerated/asi/mongo/content/sites/engage

This only removes user generated content (entered on publish) and not authored content (entered on author).  Therefore, shadow nodes are not affected.

Community User Groups

On all author and publish instances, from the security console, locate and remove the user groups that are :

For example, community-engage-x0e11-members.

Community Web Site

From the main console :

  • select Sites
  • select Community Sites folder
  • enter Select mode
  • select Community Site to delete
  • select Delete  (may need to select from More...)

Enablement Assets

From the main console :

  • select Assets
  • enter Select mode
  • select folder named with the unique site Id
  • select Delete (may need to select from More...)

Database Records

There is no tool for selectively deleting database entries for one specific enablement community site.  

When all community sites are being deleted, then drop the enablementdb and scormenginedb using MySQL Workbench.

This work is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License  Twitter™ and Facebook posts are not covered under the terms of Creative Commons.

Legal Notices   |   Online Privacy Policy