« 返回

Liferay 7 theme development using IDE-2

General Blogs 2017年12月19日 按 Sushil Patidar

I wrote blog for theme development with IDE . Further I explored the way to configure gradle project. I would like to share those steps that I have experienced hard to find and many developers I saw asking for the same thing on the forums.

Gradle Configuration

 

By default, if we create theme using IDE it templates are built using freemarker and parent theme is “_styled”. I was also stuck to this scenario and explored to find a way we can configure these particular options .

As we saw in previous blog, if we create module theme project using Gradle, in the build.gradle it applies theme builder plugin. This plugin add buildTheme gradle task to the project which generate theme files based on the parentTheme and templateExtention property configured in the task.  By default, following are the values for these property.

 

 parentName

"_styled"

 templateExtension

"ftl"

   

 

To change the values of these properties in the case if we want to generate theme files using unstyled theme and velocity template it need to configure the task properties as follows build.gradle file.

 

 

Now run buildTheme task,  files will be generated as per above configuration.

 

 

One need to include the gradle dependency based on type of parent theme configured like follows.

Styled

Unstyled
 
 
没有评论。 发表第一个留言。