Forums

Home » Liferay IDE » English

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Rob Gonzalez
Changes to init_custom.vm not showing up
November 2, 2011 10:22 AM
Answer

Rob Gonzalez

Rank: New Member

Posts: 9

Join Date: November 2, 2011

Recent Posts

Hi-

I'm building a new Liferay theme am and being crushed by this problem.

When I make changes to the init_custom.vm, the only possible way for me to see the changes is to restart Tomcat. When I make other changes to my theme, such as editing my CSS or adding images, I can see the changes after deploying the theme via the Ant Deploy target. No such luck with the templates.

I check the $CATALINA_HOME/webapps/my-theme/init_custom.vm after deploying, and that file does reflect my changes.

I cannot continue to develop if this is going to be the cycle. I must be able to make changes to the velocity template without requiring a restart. Any suggestions?

I'm using the Eclipse Liferay IDE and the Ant build to deploy my theme when I make changes. I'm using the Liferay 6.0.6 Tomcat bundle. I've also already added "include-and-override=portal-developer.properties" to my portal-ide.properties file.

Thanks!!!
-Rob
Mika Koivisto
RE: Changes to init_custom.vm not showing up
November 2, 2011 12:07 PM
Answer

Mika Koivisto

LIFERAY STAFF

Rank: Liferay Legend

Posts: 1498

Join Date: August 7, 2006

Recent Posts

I think the location of your init_custom.vm might be wrong. It should be in the same folder as all the other theme templates. By default this would be templates directory in your theme webapp. If you are using plugins sdk to develop your theme it would be in docroot/_diffs/templates
Rob Gonzalez
RE: Changes to init_custom.vm not showing up
November 2, 2011 12:25 PM
Answer

Rob Gonzalez

Rank: New Member

Posts: 9

Join Date: November 2, 2011

Recent Posts

Thanks, Mika.

The init_custom.vm is in the correct folder as you're suggesting, so that's not the problem.

-Rob
Dave Weitzel
RE: Changes to init_custom.vm not showing up
November 2, 2011 1:58 PM
Answer

Dave Weitzel

Rank: Regular Member

Posts: 181

Join Date: November 18, 2009

Recent Posts

Do you have a portal-developer.properties file in your main ROOT/WEB-INF/classes folder (where you may have portal-ext.propetties?

I believe you need to have one and then have this entry:

layout.template.cache.enabled=false

other settings may be useful in this area:

velocity.engine.resource.manager.cache.enabled=false
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.themepreview.ThemePreviewFilter=true

I also have:

theme.css.fast.load=false
theme.images.fast.load=false


to help "read" css files

I cannot guarantee that these are all needed or what they do but I get my init_custom.vm dynamically loading OK
Rob Gonzalez
RE: Changes to init_custom.vm not showing up
November 2, 2011 3:12 PM
Answer

Rob Gonzalez

Rank: New Member

Posts: 9

Join Date: November 2, 2011

Recent Posts

Thanks, Dave.

I gave those a shot, but to no avail.

I then tried upgrading to 6.1 beta (which I had downloaded) and that DOES work for me, so I'm going to stick with that.

-Rob