Themes: Best Practices

Version 2

    These suggestions and best practices can help make your work a little easier and help you avoid pitfalls.

     

    Do and Don't

    • Do set jive.devMode = true
    • Do set jive.pageCache.enabled = false
    • Avoid mapping the same FTL file in multiple overlapping mappings
    • Don't set locale in themes

      Make Your Plans

      Think about your changes in terms of the UI regions they'll touch, then plan your themes as groups of templates corresponding to those UI regions.

       

      Also, make a list of the FTL files you'll want to customize for each theme. Note that this could be different custom versions of the same file for different themes.

      Use the Right Tools

      Use browser-based tools such as the Firefox Web Developer and Firebug plugins for the Firefox web browser. These tools are useful for figuring out which CSS classes you should edit to change a particular part of the UI. Here's a shot of Firebug displaying HTML markup and CSS style corresponding to a blog post title.

       

      Use the admin console to create and save your templates, but edit them with your own editor (preferably one that features syntax coloring). The admin console provides a way to edit these files, but it's pretty basic. After you save templates, you'll find them at a path like the following:

       

      <jive_home>/themes/<theme_name>/<template_path>

       

      For example, if you create a custom template based on custom-css.ftl and associate it with a my_theme theme, you'll find it here:

       

      <jive_home>/themes/my_theme/template/global/custom-css.ftl