By default, resources are imported into a new site template named after the theme, but you can also import resources into a new site or existing sites or site templates. This tutorial covers all these options.
First you must enable Developer Mode for the Resources Importer.
Before specifying where to import your resources, you must enable Developer Mode
in your theme. To do this, add the following property to your theme’s
This is enabled by default for themes generated with the
Liferay Theme Generator.
This is a convenience feature for theme developers. With this setting enabled,
importing resources into a site or site template that already exists recreates
the site or site template. Importing resources into a site template reapplies
the site template and its resources to the sites that are based on the site
resources-importer-developer-mode-enabled=true, you must
manually delete the sites or site templates built by the Resources Importer each
time you want to apply changes from your theme’s
With Developer Mode enabled in the Resource Importer, you can choose where you want to import your theme’s resources.
By default, resources are imported into a new site template named after the
theme. If you want your resources to be imported into an existing site template,
you must specify a value for the
resources-importer-target-value property in
You must import your resources into a site if you define both public and
private page sets in your
sitemap.json. To import resources into an existing
site, uncomment the
resources-importer-target-class-name property and set it
Double check the name that you’re specifying. If you specify the wrong value, you could end up deleting (and re-creating) the wrong site or site template!
To view your theme and its resources, deploy the theme, log in as an administrator, and check the Sites or Site Templates section of the Control Panel to make sure your resources were deployed correctly. From the Control Panel you can easily view your theme and its resources:
- If you imported into a site template, open its actions menu and select View Pages to see it.
- If you imported directly into a site, open its actions menu and select Go to Public Pages to see it.
It’s just that easy to import resources with your theme!