- Go to your templates directory (theme/docroot/_diffs/templates/)
- Copy portlet.vm into portlet.58.vm (58 is a portlet id for Sign In portlet)
- Now, Sign In portlet will use portlet.58.vm, other portlets will use default portlet.vm
The same applies for instanceable portlets (e.g. you can have portlet.101_INSTANCE_ABCDE.vm).
You can find the nice piece of logic for loading a portlet template (both VM and FTL) inside com.liferay.taglib.util.ThemeUtil. It's simple:
- Let's render portlet portlet with Id: 1_WAR_samplejsonportlet_INSTANCE_UgOvIB6Y3Ppb
- Portal first tries to find portlet.1_WAR_samplejsonportlet_INSTANCE_UgOvIB6Y3Ppb.vm
- Then tries portlet.1_WAR_samplejsonportlet.vm
- Finally use portlet.vm
No comments:
Post a Comment