Preview Feature

Today, I am going to talk about the brand new “Preview” functionality added by Adobe in AEM 6.2 as part of the Translation API. This support is geared at providing exact context to the translators as they translate the XML/XLIFF content – content without presentation.

Starting AEM 6.2, the translation connectors can additionally send out marked up HTML file as supporting documents in addition to the XML/XLIFF files that were available earlier for translation. This enables translation technology providers to use this file to generate real time preview of partially translated files without having to send back content to AEM – basically by replacing the translations in this marked up HTML file on their end.

Under the hood

Here is the API for fetching the Preview of the page sent out for translation.

/**

* Gets a zip input stream containing the preview of Translation Object. This zip contains all the files required

* for offline preview of the translation object.

* @return Zip input stream, containing the preview of Translation Object.

*/

ZipInputStream getTranslationObjectPreview();

The preview is actually a zip file which has all the relevant information. The most important file in the zip package is the HTML file, which has additional markup that helps connect translated strings to exact spots in the HTML file for generating a translated preview.

Blog21.png

The highlighted markup above has links to the AEM XML/XLIFF file – see below.

Blog22.png

You can refer to the implementation of the API in the Bootstrap connector here: https://github.com/Adobe-Marketing-Cloud/aem-translation-framework-bootstrap-connector/blob/master/bundle/src/main/java/com/adobe/granite/translation/connector/bootstrap/core/impl/BootstrapTranslationServiceImpl.java

Remember this Preview is for Translation purposes only – for folks who do not have access to AEM. For folks who have access to AEM, they can preview the translations in AEM itself.

 

 

Community Site Wizard

AEM Communities now comes with an out of the box easy to use wizard that customers can use to quickly create a branded community site without writing even a single line of code. Today, I will try to provide an overview of the Community Site Wizard. Let’s go over the wizard one screen at a time.

You can launch Community Site Wizard by accessing Sites, under Community Section. Here is a quick url to access Community Sites:

http://<hostname>:<port-number>/communities/sites. On the Community Sites Admin, click Create to launch the wizard.It is a four step wizard – General Settings (Site template), Design, Settings and Preview step.

Site Template:

In this step, one has to provide general settings about the Community and most importantly pick the Site Template. A site template, defines the structure of the Community Site. There are a few templates that are available out of the box. One can edit the existing templates or create a new template from accessing Sites Templates Console (Tools, Communities, Site Templates).

Blog11.png

For this blog post, I will go ahead and create a Discussion Forum Community Site. Let’s go over these fields one by one:

Community Site Title: Self Explanatory

Community Site Description: self explanatory

Community Site Root: In case you want the Community Site to be a sub-site of a bigger site, you can specify the root path here. The Community Site is created at the specified path.

Community Site Base Language: Language of the Community Site Language. This creates the language node in the path name.

Community Site Name: This gets added to the path of the website. Think this through carefully as it gets added to site path and has impact on SEO.

Template: This is the most important field. Here you pick up the template for the Community Site.

Design:

Blog12.png

In the first section, we pick the theme. All the themes are Twitter Bootstrap themes. You can go ahead and customize or add your own theme. In the next section, you can upload an image and brand your community website.

Settings:

This is the section, where we get to do all the settings. There are multiple sections:

Blog13.png

User Management:

In this section, we pick up options pertaining to User Management. All the fields are pretty self explanatory. You can turn on Social Logins via Twitter and Facebook, to use federated logins.

Taggings:

In this section, you pick up all the namespaces defined in the Tags Manager that apply to this Community Site. One can access the existing tags (and namespaces), modify, edit, remove or add new tags under a new namespace by manage tags in the Tags Manager (Tools > Tags).

Moderation:

In this section, you can choose the moderation settings.

Content is Premoderated: If this option is selected, the content will be visible to the community on the site only when a moderator approves of it. So, if a community member posts something, it wouldn’t be visible automatically. Use this option with caution – ensure that you have staffed moderators adequately so that they do not become a bottleneck.

Flagging threshold before content is hidden: Another common scenario is where you can use the community to moderate the forum. Community members can flag any post to be inappropriate. If the same post is flagged by multiple community members – if the number is greater than than the threshold, the post will be hidden and will require a moderator to approve of it before it becomes visible again.

Community Moderators: You can select Community Moderators using this settings.

Group Management:

Here in this section, you choose who is allowed to create Groups. Refer Managing Users and Groups for more information on this topic.

Analytics:

This setting is useful only if you have licensed Adobe Analytics for collecting key metrics. Refer this page for configuring and settings up Analytics.

Translation:

These settings are useful if you wish to setup a Global Community, where we allow your users to contribute to the forum in different languages. You can choose different translation related settings in this section:

Allow machine translation: turn on this option if you want to allow your users to translate content in their preferred language. Be default, out of the box, AEM has a connector to MS translator and comes bundled with a trial license for 2 Million characters/month limit. You can buy a commercial license to get higher volumes of translation. You can also select other machine translation services likes Systran, Google Translate by writing an AEM connector to those service providers.

Select Languages to offer Machine Translation: You can tightly control all the language in which you want to offer Machine translation. At times you want to try out with a few languages before you go expand the list of supported languages. In addition, you can invest in improving the quality of machine translation by training the engines in specific languages.

Persistence Options: You can choose if you wish to store the translations in the AEM repository, once they have been translated. There are three options:

  • Do not persist: if selected, the machine translations are never saved in the AEM repository

Translation Contributions on User request and persist afterwards: if selected, when first user requests for the translation, AEM calls the machine translation service and then persists the translation thereafter. This option is useful if you wish to control machine translation costs and worry about the repository size.

  • Automatically translate new contributions and persist them: when this option is selected, the translations are requested as soon as a contribution is made in all supported languages – and then persisted thereafter. This option is useful if you wish to provide the best user experience to your community. This option also helps community members search for content, when it is not posted in their native language. Another feature, covered in this Blog post: https://experiencelabs.wordpress.com/2016/08/23/multilingual-searchmls-breaking-the-language-barrier/

Enablement:

Enablement is different kind of content, which is produced by the internal folks rather than being produced by Community. It is targeted for structure learning and training. We shall cover this in a different blog post.

Preview:

The last step of the Wizard is Preview. All you can do here is click on the “Create” button and wait for the site wizard to put together a site for you. You need not worry too much about the settings, we will be able to come back to these settings (some of them) and change them using the “Edit Site” functionality.

Once the Wizard finishes processing, you will be navigated to the Community Site Admin, where we had started in the first place. However, you will see a folder and a newly created Community Site under it.

Blog14.png

The Site offers three options:

  • Open Site: You can access this to Preview the site and make sure that it looks the way you wanted.
  • Edit Site: Click this to make modifications and change some of the settings that we had initially chosen in the wizard.
  • Publish: this is the final step. When you are ready and everything looks good, you can publish the site to the Publish instance. After this operation your Community can start accessing the Community site and start collaborating.

As you saw, we were able to put together a branded functioning site without writing a single line of code.

Please share your experiences with us and let us know if you find these blogs helpful.

Multi-root Launches

Today, I will talk about a multi-root Launches, which is key enhancement to Launches feature in AEM 6.2. I am also happy to share that I got a chance to contribute to this features. Launches, have been around for a while, and are widely used. Now AEM core features like Translation workflows have started to leverage Launches as a staging area for working on translations before they replace the actual content. Based on the customer and internal feedback, we identified two key shortcomings in Launches and we worked on those in AEM 6.2 under guidance from Gilles Knobloch, Mathias Siegel and Akshay Madan at Adobe. They being:

  • Multi-root launches.
  • Promoting only changed pages in a Launch.

Multi-root Launches

Prior to AEM 6.2, when you created a launch, you had to create a copy of the complete branch. You did not have the option to select a few sub sites and work on those. This has been completed revamped in AEM 6.2. Firstly, you can select, multiple pages (including sub pages) at the same level and create a Launch. In addition, you can also add other pages (including sub pages) at a very different level using the “Create Launch Wizard”.

Let me explain this feature using the Geometrixx sample. Let us say that for the next update, we want to work only on three sections in the website – Products, Services and Press Center. As you are aware, Products and Services are at the same level, however Press Center is at a very different level.

We will create a Launch to have just these three branches. Firstly, select both Product and Services and select Create > Launch.

create_launch_en.png

This will open up the Create Launch Wizard and will have these two sections of the website in there.

create_launch_wizard.png

Next, Select “+ Add Pages” and browse to the Press Center. Select it and add it.

create_launch_add.png

This will add Press Center as an additional root in the Create Launch Wizard. The three roots being, Products, Services and Press Center. Products and Services were at the same level, but Press Center is at a different level.

create_launch_wizard_2.png

Select Next to view Properties and set the Properties.

create_launch_properties.png

Using this dialog, you can also change the template as well. Very useful, when you want to update the look and feel of the website.

Clicking on Create will create the Launch, and it will have only the selected roots (branches as part of the Launch).

Under the hood:

Let’s try to see the structure of the newly created Launch. Unfortunately, you can’t browse launches structure in Sites Admin (I don’t know why, Adobe can you please enable this), hence we shall see it in CRXDE.

crx.png

As you will see there are three sources, and only the selected content is added in the Launches. Make sure to observe that there is only Press Center content under Company.

Alternately, you can see the structure using Path Browser (from Create Launch Wizard)

path_browser.png

Promoting only changed Pages:

In the first enhancement, we saw that starting AEM 6.2, you can create a Launch with a smaller scope, with only those sections that you are going to update. However, not all pages in a launch get updated. The next enhancement is targeted at solving that problem. While promoting a Launch, the new default option is to promote only the changed pages. This is a very useful enhancement as it reduces the number of pages that need to be promoted.

Let’s look at this enhancement in action using the launch that we created while explaining multi-root Launches. We will go ahead and update the Products Page, add a new page in Products section (hexagon) and also update Services Page. What we are not doing is going to edit in the Press Center section. This is a common scenario where you think that you are going to update something, but then plans change, and you do not update a section anymore. In such cases, this enhancement helps us remove any of the content that is not updated.

Once you have made edits, let’s go ahead and promote pages.

launch_promote.png

As you see in the screenshot above, there are four options under Scope. The default option selected is “Promote modified pages”. This option will only promote the pages that have been modified after the Launch was created. Let’s look closer at all the four options:

  • Promote full Launch
    This option will promote all the pages in a Launch, irrespective of the fact of they were modified or not.
  • Promote modified pages
    This option will promote only those pages in the Launch that have been modified after the Launch was created.
  • Promote current page
    There are several ways in which you can invoke Promote. Using the “References Panel” you can invoke the action to Promote a page from any page that is part of the Launch. In such cases, you can select to promote only selected sections of the Launch. If you invoke Promote action from within a page of a Launch, using this option, you can go ahead and promote only the selected page.
  • Promote current age and sub pages
    This option builds on the previous option. Using this option, we can go ahead and promote a page that is part of the Launch along with it’s sub pages.

Let’s try these options one by one on our Launch. Remember, the changes that we did. Here is a summary:

  • Products
    • Updated Products Page and added a new page – hexagon
  • Services
    • Updated Strategic Consulting page
  • Press Center
    • No changes.

Option1 (default): Promote only modified pages.

When you select these options, you will see that it will list only those pages that we modified. The three pages that we listed above:

promote_modified.png

Option 2: Promote full Launch

Selecting this option, will promote all the pages in the Launch. So it will list all the pages in the Launch whether you modified it or not.

promote_full.png

Options 3: Promote current page.

In this scenario, we will set the context to be “Services” and try to Promote Pages.

promote_current.png

Option 4: Promote current page and all sub pages

With the same context, we will use the last option.

promote_subpages.png

What is important to note is that, there is no optimization regarding which pages to update. It will update current page and all the subpages irrespective of the fact if they were modified or not.

Hopefully this was useful. Look forward to hearing comments.