There are a few different ways to make themes. Here's the documentation on each:
You'll also find an overview in Themes Overview.
A FreeMarker include is a template that's being included in another template. For example, if you're using a sidebar.ftl in your document.ftl, like so:
<!-- document.ftl-->
. . .
<#include "/template/global/include/sidebar.ftl" />. . .
Global themes exist for any request to the system, URL themes are applied to specific URLs (which themselves can be regular expressions) and community themes only apply to requests that are associated with a specific community (other than the root community). See Mapping Themes to the UI.
URL
mapping, then community, then global. In other words, first the URL is
checked to see if a theme mapping exists. Then the action is checked to
see if it's associated with a community. Finally, if there is a global
mapping, that mapping is used.
Yes, the only thing that you can't theme is the file /template/global/include/jive-macros.ftl.
Jive includes a theme resource kit you can use to make changes to global aspects of the UI. For more information, see Customizing UI with the Theme Resource Kit.
Assuming you had a theme called 'rick' in your themes directory and a directory called 'images' inside the 'rick' theme, you could reference an image in that directory in Freemarker syntax using code like this:
<img src="<@s.url value="/themes/rick/images/test.png" />" border="0" />
If you had a CSS file in a theme called 'rick', you would reference / import the CSS file into your template using Freemarker syntax that looks like this:
<link rel="stylesheet" href="<@s.url value='/themes/rick/test.css'/>" type="text/css"
media="screen" />
Certain resources from themes and plugins are cached by default for 28 days. This change ordinarily enhances perfomance for users. It also means that client computers -- including yours while you're developing and your users' after the theme or plugin has been deployed -- might continue to use cached resources for longer than you'd like.
If you want to ensure that the browser displays the latest version of the resource, you can:
Resources set for the long cache include the following file types: .js, .css, .gif, .jpe, .jpg, and .png.
Yes, you can use the Java system property 'themes.directory' when starting the application to specify the name of a directory that it should use when loading themes.
Never. Seriously. Why? The theme editor exists in the admin console to give you the ability to quickly make a simple change, but it lacks syntax highlighting, color coding, tab support, versioning and many other things that developers come to expect from an editor. In short, if you have a serious production site, or even if you are merely developing themes, you shouldn't use the editor in the admin console unless it's an emergency.
If
you are a developer, the following steps incorporate the best practices
for developing a theme. First you will need a local development
instance. The following directions assume that you have a running local
instance, and know where to find your JIVE_HOME directory. Jive
supports Freemarker and Soy themes.