This article covers a Bloomreach Experience Manager version 11. There's an updated version available that covers our most recent release.

Adding a mobile version for existing site

This page describes how to add a mobile channel for an existing site. This page assumes you are familiar with 1) Adding a new language to an already existing site and 2) Adding a new (sub)site. Also, we assume that the new channel (mobile) will use the same content as the already existing channel (the website).

We assume reusing content

Thus, we do not need to do anything in the CMS regarding content.

This page is very similar to adding a new site and translation, except for the last part, where we explain hst:types

Steps in the HST-2 configuration

1 Add a new hst:configuration for the new mobile version of myproject.

Assume we already had different translations for myproject and have the following hst:configuration

+ hst:hst
    + hst:configurations
        - hst:default
        + common
        |   + hst:pages
        |   + hst:components
        |   + hst:templates
        |   + hst:catalog
        + myproject
        |   - hst:inheritsfrom = ../common
        |   + hst:sitemap
        |   + hst:sitemenus
        + monprojet
            - hst:inheritsfrom = ../common
            + hst:sitemap
            + hst:sitemenus

Depending on your domain specific use case, we can or cannot reuse the common part for the already existing site myproject. Assume that the new channel mymobile has the same hst:components and hst:catalog but it has different hst:pages and hst:templates. We can thus reuse everything except the hst:pages and hst:templates. If we first move hst:pages and hst:templates to website, and make sure we use multiple inheritance, we can later on easily add mymobile. Thus

Step 1 Split off hst:pages from common

+ hst:hst
    + hst:configurations
        - hst:default
        + common
        |    + hst:components
        |    + hst:catalog
        + website
        |    + hst:templates
        |    + hst:pages
        + myproject
        |    - hst:inheritsfrom = {../website , ../common}
        |    + hst:sitemap
        |    + hst:sitemenus
        + monprojet
            - hst:inheritsfrom = {../website , ../common}
            + hst:sitemap
            + hst:sitemenus

hst:inheritsfrom for myproject and monprojet now has two values

The hst:inheritsfrom is a multi valued property. So, with {../website , ../common} we mean two property values.

Step 2 Add mymobilecommon and mymobile

+ hst:hst
   + hst:configurations
       - hst:default
       + common
       |    + hst:components
       |    + hst:catalog
       + website
       |    + hst:templates
       |    + hst:pages
       + myproject
       |    - hst:inheritsfrom = {../website , ../common}
       |    + hst:sitemap
       |    + hst:sitemenus
       + monprojet
       |    - hst:inheritsfrom = {../website , ../common}
       |    + hst:sitemap
       |    + hst:sitemenus
       + mymobile
            - hst:inheritsfrom = {../common}
            + hst:sitemap
            + hst:sitemenus
            + hst:templates
            + hst:pages

Now you can customize the hst:pages and hst:templates for the mobile version just to get a mobile site.

2 Add a new hst:site for the new mobile channel

Assume you already had:

+ hst:hst [hst:hst]
   + hst:sites [hst:sites]
       + myproject [hst:site]
       + monprojet [hst:site]

Copy the myproject, and rename it to mymobile. Because we reuse the same content for the website and the mobile channel, the hst:content property points to the same content as the hst:content property for myproject. We thus get something like:

+ hst:hst [hst:hst]
    + hst:sites [hst:sites]
        + myproject [hst:site]
        + mymobile [hst:site]
        + monprojet [hst:site]

3 Create the host or "URL space" for the new mobile channel.

Assume you already had

+ hst:hst [hst:hst]
    + hst:hosts [hst:virtualhosts]
        + prod [hst:virtualhostgroup]
            + com [hst:virtualhost]
            |   + myproject [hst:virtualhost]
            |       + www [hst:virtualhost]
            |           + hst:root [hst:mount]
            + fr [hst:virtualhost]
                + monprojet [hst:virtualhost]
                    + www [hst:virtualhost]
                        + hst:root [hst:mount]

now, adding the new mobile as a new host can be done as follows:

+ hst:hst [hst:hst]
    + hst:hosts [hst:virtualhosts]
        + prod [hst:virtualhostgroup]
            + com [hst:virtualhost]
            |   + myproject [hst:virtualhost]
            |       + www [hst:virtualhost]
            |       |   + hst:root [hst:mount]
            |       + m [hst:virtualhost]
            |           + hst:root [hst:mount]
            + fr [hst:virtualhost]
              + monprojet [hst:virtualhost]
                   + www [hst:virtualhost]
                       + hst:root [hst:mount]

We have added above the host m.myproject.com. Make sure the hst:mountpoint for

/hst:hst/hst:hosts/prod/com/myproject/m/hst:root 

points to the created node /hst:hst/hst:sites/mymobile in the step 2.

Now we still need to do one important thing. Namely, we need to indicate that the new channel is of type mobile. Consider the following: HST needs to create a cross domain link between the French and English sites. However, in a mobile environment, we want a mobile cross domain link, and in website environment, we want a website link; in the content however, the link between the two documents is the same. We thus need to give HST an extra hint about the channel. We do this through the  hst:types property on the hst:mount. Mounts that have the most types in common, have preference to link to each other.

Add a hst:types property

The hst:types is a mulite valued property.

Thus, in the example above, for example add to the Mount at hst:hst/hst:hosts/prod/com/myproject/m/hst:root the property:

hst:types = mobile

Now, if you also add a French mobile version, then cross domain links have channel awareness: The links stay within the website versions for websites and vice versa for mobile sites.

Optional: Add the new channel to the channel manager overview

The steps above do not make the new channel visible in the Channels Perspective. This can be done by following the steps at HST-2 Channel Manager

To add the new channel to the Channels Perspective, follow HST-2 Channel Manager.

Did you find this page helpful?
How could this documentation serve you better?
On this page
    Did you find this page helpful?
    How could this documentation serve you better?