[英]Liferay: Get URL in portal.normal.vm from properties file
[英]theme_SERVLET_CONTEXT_/templates/portal_normal.vm does not exist
我正在嘗試使用一些基本的CSS和一些頁眉和頁腳創建一個基本的liferay Maven主題
我已經創建了一個頁面並將該主題應用於該頁面。
基本上我的主題文件夾結構是
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
而我的portal_normal.vm的路徑是
sample-theme\src\main\webapp\WEB-INF\_diffs\templates\portal_normal.vm
當我打開頁面時,控制台theme_SERVLET_CONTEXT_/templates/portal_normal.vm does not exist
。
可能是什么問題?
您的theme
結構不正確。 在Maven
構建theme
,不需要_diffs
文件夾。
下面的屏幕快照顯示了在Maven
構建theme
必須遵循的theme
結構
這是pom.xml
中的定義
<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>
<liferay.theme.parent>classic</liferay.theme.parent>
<liferay.theme.type>vm</liferay.theme.type>
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.