What's new in wcm.io in March+April 2019

A lot of features and improvements where added in the last two months to the wcm.io Libraries. Here are the hightlights.

(The versions listed in this page are the version last published, not necessarily the version where the mentioned features were added).

Table of Contents

Updated wcm.io Handler documentation

We added and updated a lot of documenation for the wcm.io Handler libraries. The most important additions are "general concepts" pages for each of the handlers the give a toplevel overview of the features, concepts and architecture of the handlers:

Media Handler 1.4.0: Responsive Image Handling

With the latest Media Handler releases we've renovated the responsive image handling using HTML5 standard markup. This was possible all the time using custom media markup builders, but now we have a good support available out-of-the-box and an enhanced API support for using it.

Example for using the responsive images from documentation

See also What's new in wcm.io Media Handler 1.2

In most projects the component dialog tab for defining links was quite similar - but had to be copied from project to project because it was not reusable enough. With the latest Link Handler implementation we have a generic "Link reference Container" Granite UI component which renders the complete link dialog tab - and allows to be parameterized to show the link title or not.

The link type options that are provided are dynamically populated based on the link handler configuration of the projects (which link types are available).

The path fields that allow to pick content pages or assets are also dynamically initialized to use the correct root path derived by sensible defaults or set by link handler configuration.

It can also be customized to show additional project-specific fields for a specific link type or all link types.

Link Handler Granite UI components documentation

RichText Handler 1.2.0: Custom RTE plugin

The RichText Handler finally provides a custom RTE plugin that allows to define links using the same parameters (link type, link target etc.) as in the generic link dialog.

It can also be customized to show additional project-specific fields for a specific link type or all link types.

RichText Handler RTE link plugin documentation

URL Handler 1.2.4: Site Root Path Field

The URL Handler now provides predefined Granite UI components for picking a page from the current site, automatically initializing them when the site root according to the current URL handler site root configuration.

It provides both an extension of the Path Field and Path Browser components.

URL Handler Granite UI components documentation

WCM Granite UI Extensions 1.3.0: All-purpose path field and updated Granite UI validators

Initially the AEM Touch UI provided a "Path Browser" component to pick paths from the repository. This was deprecated in AEM 6.3 and replaced with a new "Path Field" component. Unfortunately both the generic AEM "Path Field" components and it's decsendant the AEM "Page Field" components have several issues making them unusable as drop-in replacement for the old "Path Browser" component (examples for the issues: Showing pages not in repository order, using the search field produced unwanted results, re-opening the path browser at the correct position does not work etc.).

We created an extension of the generic "Path Field" component and customized at in a ways that it's a very usefully all-purpose path field. It can be used for picking pages, assets, experience fragments and so on. Enhancements over the AEM versions:

  • Keep repository order for orderable parent nodes (e.g. pages)

  • Always display root path in an extra column, so it can be selected as well

  • Path field always displays only the subtree of the configured root path, regardless if the given path value has a path outside the root path

  • Limit search result to pages and assets

  • Hides certain “AEM-internal” content paths which should not be shown when picking pages or assets

Granite UI Extensions Components documentation for Path Field

Additionally the Granite UI validators where updated. The provides regex rule for validating URLs had several issues and is not simplified and in-line with the wcm.io URL and Link handler checks.

A new validator for validation content paths was added as well (unfortunately the AEM path field does not support validators).

Granite UI validators documentation

wcm.io Parsys 1.3.0

A couple of small but important improvements to our custom paragraph system:

  • New parsys component property 'wcmio:parsysParagraphNoDecorationWcmMode' that allows to hide the decoration in certain WCM modes, e.g. when wcmmode=disabled.

  • New parsys component property 'wcmio:parsysParagraphValidate'. If set to true, each paragraph item is validated. If it is not valid, it’s hidden when wcmmode=disabled. To validate the paragraph item a Sling Model has to be implemented registered to the adapter io.wcm.wcm.parsys.ParsysItem and the resource type of the paragraph item’s resource.

    • Example use case: A link list paragraph system that generated <li> elements for each item. If a link item is invalid (e.g. because the link targets does not exist), not only the link but alsoe the <li> elements should be hidden.

  • And some more improvements for using the parsys in template editor or customizing/wrapping the parsys markup.

wcm.io Parsys usage documentation

wcm.io WCM Commons 1.4.0

Added a new "Bundle Info Services" and "Version Info Model" that makes it easy to implement a project-specific version info page.

API documentation of BundleInfoService and VersionInfo model.