To truly appreciate a theme, you must view it with content. Showcasing a theme in the proper context is key to communicating the true intentions of its design. Who better to do this than the theme’s designer? Designers can provide a sample context that optimizes the design of their themes. The Resources Importer does this for you.
The Resources Importer module lets theme developers import files and web content with a theme. Administrators can use the site or site template created by the Resources Importer to showcase the theme. In fact, all standalone themes that are uploaded to Liferay Marketplace must use the Resources Importer. This ensures a uniform experience for Marketplace users: a user can download a theme from Marketplace, install it, go to Sites or Site Templates in the Control Panel and immediately see their new theme in action.
Organizing Your Resources
Add your resources to the theme’s
as outlined below:
sitemap.json- defines the pages, layout templates, and portlets
assets.json- (optional) specifies details on the assets
documents/- contains documents and media files (assets)
articles/- contains web content (HTML) and folders grouping web content articles (XML) by template. Each folder name must match the file name of the corresponding template. For example, create folder
Template 1/to hold an article based on template file
structures/- contains structures (JSON) and folders of child structures. Each folder name must match the file name of the corresponding parent structure. For example, create folder
Structure 1/to hold a child of structure file
templates/- groups templates (VM or FTL) into folders by structure. Each folder name must match the file name of the corresponding structure. For example, create folder
Structure 1/to hold a template for structure file
Using the Resources Importer involves the following steps:
- Preparing and Organizing Resources
- Creating a Sitemap for the Resources Importer
- Defining Assets for the Resources Importer (optional)
- Specifying Where to Import Your Theme’s Resources
This section explains how to use the Resources Importer to import resources with your theme.