2015-09-29 16 views
0

我想了解一些有关创建和更改Liferay主题的内容。现在我想对默认主题进行一些更改。我为liferay主题创建了maven原型的项目。将默认主题设置为父项,将所有文件复制到我的/ webapp文件夹。在这里我的pom.xml如何使用默认主题作为父项在Liferay中创建自定义主题?

<?xml version="1.0"?> 

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> 
<parent> 
    <artifactId>theme</artifactId> 
    <groupId>by.velcom</groupId> 
    <version>1.0.0</version> 
</parent> 
<modelVersion>4.0.0</modelVersion> 
<artifactId>sample-theme</artifactId> 
<packaging>war</packaging> 
<name>sample-theme Theme</name> 
<build> 
    <plugins> 
     <plugin> 
      <groupId>com.liferay.maven.plugins</groupId> 
      <artifactId>liferay-maven-plugin</artifactId> 
      <version>${liferay.maven.plugin.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> 
     <plugin> 
      <artifactId>maven-resources-plugin</artifactId> 
      <version>2.5</version> 
      <configuration> 
       <encoding>UTF-8</encoding> 
      </configuration> 
     </plugin> 
    </plugins> 
</build> 
<dependencies> 
    <dependency> 
     <groupId>com.liferay.portal</groupId> 
     <artifactId>portal-service</artifactId> 
     <version>${liferay.version}</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.liferay.portal</groupId> 
     <artifactId>util-bridges</artifactId> 
     <version>${liferay.version}</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.liferay.portal</groupId> 
     <artifactId>util-taglib</artifactId> 
     <version>${liferay.version}</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>com.liferay.portal</groupId> 
     <artifactId>util-java</artifactId> 
     <version>${liferay.version}</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>javax.portlet</groupId> 
     <artifactId>portlet-api</artifactId> 
     <version>2.0</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet</groupId> 
     <artifactId>servlet-api</artifactId> 
     <version>2.4</version> 
     <scope>provided</scope> 
    </dependency> 
    <dependency> 
     <groupId>javax.servlet.jsp</groupId> 
     <artifactId>jsp-api</artifactId> 
     <version>2.0</version> 
     <scope>provided</scope> 
    </dependency> 
</dependencies> 
<properties> 
    <liferay.theme.parent>_unstyled</liferay.theme.parent> 
    <liferay.theme.type>vm</liferay.theme.type> 
</properties> 

然后,我改变了样式和模板的东西,部署样本theme.war。 新主题已添加到配置 - >显示设置(样本主题)。但是,当我选择并应用时,我看不到我做出的任何更改。有人能说我做错了吗?

+1

这应该是一个好开始:https://dev.liferay.com/develop/tutorials//knowledge_base/6-1/creating-liferay-themes –

回答

0

如果在默认情况下你指的是经典的,那么你必须改变

<liferay.theme.parent>_unstyled</liferay.theme.parent> 

<liferay.theme.parent>_classic</liferay.theme.parent> 

并运行Maven的任务,使其适用于它,记住你必须仅复制要修改的文件。

相关问题