Upgrading 6.2 Layout Templates to 7.2

Upgrading your Liferay DXP 6.2 layout template to Liferay DXP 7.2 requires a few updates:

  1. Open your layout template’s liferay-plugin-package.properties file and update the liferay-versions property to 7.2.0+:

    liferay-versions=7.2.0+
    
  2. Velocity layout templates are supported, but deprecated as of Liferay DXP 7.1. We recommend that you convert your Velocity layout templates to FreeMarker now. Wrap the processor.processColumn("column-1", "portlet-column-content portlet-column-content-first") methods with braces ({...}) and change the template’s file extension to .ftl.

  3. Update the Bootstrap span[number] classes to use the newer col-[size]-[number] classes. See Layout Templates for more information on the updated syntax.

  4. Save the changes.

    Below is an example configuration:

    Original:

    <div class="span4 span6 portlet-column portlet-column-first" 
    id="column-1">
            $processor.processColumn("column-1", 
            "portlet-column-content portlet-column-content-first")
    </div>
    <div class="span8 span6 portlet-column portlet-column-last" 
    id="column-2">
            $processor.processColumn("column-2", 
            "portlet-column-content portlet-column-content-last")
    </div>
    </div>
    

    Updated:

    <div class="col-md-4 col-sm-6 portlet-column portlet-column-first" 
    id="column-1">
            ${processor.processColumn("column-1", 
            "portlet-column-content portlet-column-content-first")}
    </div>
    <div class="col-md-8 col-sm-6 portlet-column portlet-column-last" 
    id="column-2">
            ${processor.processColumn("column-2", 
            "portlet-column-content portlet-column-content-last")}
    </div>
    </div>
    

Awesome! Your layout template is upgraded.

« Upgrading a Layout Template to 7.2Upgrading 7.0 and 7.1 Layout Templates to 7.2 »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0