0

I am trying to create a basic liferay maven theme with some basic css and some header and footer

I have created a page and applied this theme for that page.

Basically my theme folder structure is

sample-theme
sample-theme/pom.xml
sample-theme/src
sample-theme/src/main
sample-theme/src/main/resources
sample-theme/src/main/webapp
sample-theme/src/main/webapp/WEB-INF
sample-theme/src/main/webapp/WEB-INF/liferay-plugin-package.properties
sample-theme/src/main/webapp/WEB-INF/web.xml

and my portal_normal.vm's path is

sample-theme\src\main\webapp\WEB-INF\_diffs\templates\portal_normal.vm

When I open the page I get theme_SERVLET_CONTEXT_/templates/portal_normal.vm does not exist in the console.

what might be the problem?

Seeker
  • 2,405
  • 5
  • 46
  • 80

1 Answers1

0

You are having a wrong theme structure. You don't need a _diffsfolder while building a theme in Maven.

Below is the screenshot which shows the theme structure you have to follow while building a theme in Maven

Maven Liferay Theme

Here are the definitions in pom.xml

plugin

     <plugin>
            <groupId>com.liferay.maven.plugins</groupId>
            <artifactId>liferay-maven-plugin</artifactId>
            <version>${liferay.version}</version>
            <executions>
                <execution>
                    <phase>generate-sources</phase>
                    <goals>
                        <goal>theme-merge</goal>
                        <goal>build-css</goal>
                        <goal>build-thumbnail</goal>
                    </goals>
                </execution>
            </executions>
            <configuration>
                <autoDeployDir>${liferay.auto.deploy.dir}</autoDeployDir>
                <appServerDeployDir>${liferay.app.server.deploy.dir}</appServerDeployDir>
                <appServerLibGlobalDir>${liferay.app.server.lib.global.dir}</appServerLibGlobalDir>
                <appServerPortalDir>${liferay.app.server.portal.dir}</appServerPortalDir>
                <liferayVersion>${liferay.version}</liferayVersion>
                <parentTheme>${liferay.theme.parent}</parentTheme>
                <pluginType>theme</pluginType>
                <themeType>${liferay.theme.type}</themeType>
            </configuration>
    </plugin>

properties

<liferay.theme.parent>classic</liferay.theme.parent>
<liferay.theme.type>vm</liferay.theme.type>
Community
  • 1
  • 1
Niranjan
  • 1,776
  • 1
  • 13
  • 21
  • I am having the same issue, but I have the structure setup correctly. Do I need to include ALL files from the classic theme for this to work? I thought the liferay build process was supposed to add these files. What goal do you run to build the theme? – acvcu May 09 '14 at 12:43