Why doesn’t an SDK theme with no modifications look like the Classic theme?
You’ve created a theme with the SDK, made no modifications, and deployed it. Why doesn’t it look like the classic theme? The SDK doesn’t really copy classic at all. It copies _unstyled, and _styled. This is the default set of actions in the build script. The classic theme defines the styles for its color schemes in custom.css. This isn’t a file that’s copied as part of the build process.
Can our main.css file be modified? Are there any advantages/disadvantages?
main.css can be included in the _diffs directory, edited to remove the inclusions of other CSS files, or to add new ones. In addition, don’t forget that the stylesheets and top/bottom includes can be turned off when users aren’t signed in. Any stylesheets included with the import statement will be minified. This is useful when you need to add custom stylesheets that may or may not live in the application context.
@import url(base.css); @import url(custom.css); @import url(some_file_hosted_elsewhere.css); div { margin: 0px; padding: 0px; }main.css
Why can’t you develop a theme in .JSP?
At version 4+, JSP-based themes were no longer able to get access to most of the Portal’s classes due to the new class loader. JSP-based themes have to be built in ext-web. By putting your theme in ext-web, you can deploy it to the root context, which will allow your .jsp files access to the full code. This is documented in Liferay’s own docs.
You can include .jsp files in your theme though. By using the $theme.include(“path_to_jsp”) construct, you can pass cause the .jsp output to be rendered to the response. This is how the top_include and bottom_include mechanisms work.
How do you turn off cache/minify?
Velocity cache can be turned off in a vanilla Liferay 5.2.3 install using the following properties in portal-ext.properties.
theme.css.fast.load=false
theme.images.fast.load=false
javascript.fast.load=false
javascript.log.enabled=true
layout.template.cache.enabled=false
browser.launcher.url=
last.modified.check=false
openoffice.cache.enabled=false
velocity.engine.resource.manager.cache.enabled=false
com.liferay.portal.servlet.filters.cache.CacheFilter=false
com.liferay.portal.servlet.filters.theme.ThemePreviewFilter=true
These properties are also included by default in liferay-portal-5.2.3tomcat-6.0.18webappsROOTWEB-INFclassesportal-developer.properties. (I simply rename this file portal-ext.properties).
The css- and js- minifiers/cache can be removed by editing the deployed web.xml file for the specific application. Simply remove the applied filters from web.xml, and then you can edit the entire application right in the context directory.
Will velocity parse my html files?
The velocity parse statement will accept files with the .html extension. The parsed files are treated almost exactly like files with the extension .vm, interpolating velocity variables in context. However, the portal code performs certain operations based on the file extension, so this technique is not advisable for the top-level files specified by the docs.
$parse(“$full_templates_path/../html/html_file.hml”);

