Documentation Home

Initial Configuration

NOTE: The Advanced CMS module is dependent on the Theme module. Please follow the Theme module installation instructions before proceeding.

By following the steps below, you will be able to convert your non-themed Broadleaf site to one that supports Advanced CMS. At the time of writing, these instructions were based on a version of the Heat Clinic sample project targeting Broadleaf version 3.1.2-GA and Advanced CMS module version 1.0.0-GA.

Configuration Changes

  1. Add the following to the dependency management section of your parent pom.xml:

    <dependency>
        <groupId>com.broadleafcommerce</groupId>
        <artifactId>broadleaf-advanced-cms</artifactId>
        <version>1.1.0-SNAPSHOT</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.broadleafcommerce</groupId>
        <artifactId>broadleaf-jobs-events</artifactId>
        <version>1.0.0-SNAPSHOT</version>
        <type>jar</type>
        <scope>compile</scope>
    </dependency>
    

    Note: You must have previously configured your pom to reference the Broadleaf private repositories. This information will be provided as part of your license agreement.

  2. Pull these dependencies into your core/pom.xml:

    <dependency>
        <groupId>com.broadleafcommerce</groupId>
        <artifactId>broadleaf-advanced-cms</artifactId>
    </dependency>
    <dependency>
        <groupId>com.broadleafcommerce</groupId>
        <artifactId>broadleaf-jobs-events</artifactId>
    </dependency>
    
  3. Add the following line to both the site and admin applicationContext-datasource.xml:

    <jee:jndi-lookup id="webEventDS" jndi-name="jdbc/event"/>
    
  4. Add the following persistence unit in persistence-core.xml:

    <persistence-unit name="blEventPU" transaction-type="RESOURCE_LOCAL">
        <non-jta-data-source>jdbc/event</non-jta-data-source>
        <exclude-unlisted-classes/>
    </persistence-unit>
    
  5. Add the following source to the blMergedDataSources bean in core/applicationContext.xml:

    <entry key="jdbc/event" value-ref="webEventDS"/>
    
  6. When starting your application server, you need to ensure support for load time weaving. Please see the Load Time Weaving instructions for more details.

HTML Changes

Add the following line to the footer of Site, below your JavaScript library imports. This line triggers the importation of JavaScript for each widget that is active on the page.

<blc:widget-js />

Data Changes

Schema Changes

If you are allowing hibernate to create and modify your tables, this will be done automatically when you restart with the new configuration settings.

Otherwise, you will need to generate the SQL to customize your Broadleaf implementation. See the Broadleaf Schema Upgrade Documentation for details.

Admin Security Changes

To maintain theme configurations in the Broadleaf admin, you will need to load new permissions. The recommended changes are located in the following files:

/config/bc/sql/load_advanced_cms_admin_security.sql

Note: In development, you can automatically load this SQL by adding this file to the blPU.hibernate.hbm2ddl.import_files property in the development-shared.properties file.

Optional Data Changes

If you want to augment the Heat Clinic demo with some ContentItems and ContentZones, you can utilize the following two files:

/config/bc/sql/samples/load_advanced_cms_content_types.sql
/config/bc/sql/samples/load_advanced_cms_demo_data.sql