Using Developer Mode with Themes

This article shows how to enable Developer Mode in your app server manually and through Dev Studio DXP, as well as how to configure other settings that may benefit you during development. Each topic is explained in the relevant section below.

Enabling Developer Mode Manually

Follow these steps to enabled Developer Mode in your app server manually:

  1. Create a portal-ext.properties file in your server’s root folder if it doesn’t exist.

  2. Add the line below to it:

    include-and-override=portal-developer.properties
    

    Alternatively, add the properties from the portal-developer.properties file to your portal-ext.properties file that you want to use.

  3. Start your app server to apply the changes.

Read the next section to learn how to enable Developer Mode in Dev Studio DXP.

Setting Developer Mode in Dev Studio DXP

Follow these steps to enable Developer Mode for your app server in Dev Studio DXP:

  1. Double-click on your server in the Servers window and open the Liferay Launch section.

  2. Select Custom Launch Settings and check the Use developer mode option.

  3. Save the changes and start your server.

Figure 1: The Use developer mode option lets you enable Developer Mode for your server in Dev Studio DXP.

Figure 1: The *Use developer mode* option lets you enable Developer Mode for your server in Dev Studio DXP.

Configuring FreeMarker System Settings

By default, FreeMarker theme templates and web content templates are cached. You can change this behavior through System Settings with the steps below:

  1. Open the Control Panel and go to ConfigurationSystem Settings.

  2. Select Template Engines under the PLATFORM heading.

  3. By default, the Resource modification check (the time in milliseconds that the template is cached) is set to 60000. Set this value to 0 to disable caching.

Your FreeMarker templates are ready for development. Next you can learn how to improve JavaScript file loading for development.

JavaScript Fast Loading

By default, JavaScript fast loading is enabled in Developer Mode (javascript.fast.load=true). This loads the packed version of files listed in the Portal Properties javascript.barebone.files or javascript.everything.files. You can, however, disable JavaScript fast loading for easier debugging for development. Just set javascript.fast.load to false in your portal.properties, or you can disable fast loading by setting the URL parameter js_fast_load to 0.

Great! You’ve set up your server for Developer Mode. Now, when you modify your theme’s file directly in your bundle, you can see your changes applied immediately on redeploying your theme!

« Developing ThemesBuilding Your Theme's Files »
¿Fue útil este artículo?
Usuarios a los que les pareció útil: 0 de 0