Themes are files containing HTML, CSS, javascript, plus images or other multimedia resources that work together to provide the design and functionality of your Perforce Chronicle site(s). Multiple themes may be available so that you may quickly change the look of a site. Themes may adjust the presentation in small and large ways, from adjusting font sizes to providing custom markup for all Chronicle operations.
The primary benefit of using themes is that it separates the presentation of your content from the code that manages content. This separation allows modules to be added/removed, or Chronicle to be upgraded without losing your customization work or requiring significant updates to maintain the visual design of your site.
The secondary benefit of themes, particularly when a large number of themes are available, is that you do not need to know or learn HTML, CSS, JavaScript, or even PHP in order to have a good-looking site, nor to change the visual design or layout.
This guide helps theme designers, or those wishing to customize a theme, to understand how themes work with Chronicle, where a theme's files and resources must be placed, and describe a theme's components to create a unique look for your site. This guide helps theme designers (or those wishing to customize a theme) to understand how themes work with Chronicle, where a theme's files and resources must be placed, and also describe how a theme's components can be changed in order to create a unique look for your site.
Chronicle does not use a one-file-per-web-page approach. Generally, there is no single file that can be edited to adjust the presentation for a single page. Instead, Chronicle generates web pages by combining several components such as content entry values, a view script and a layout. Default view scripts and layouts are provided but the theme has the option of providing customized versions. This approach makes web content management more powerful and sophisticated, but it requires you to understand how the various theme components work together.
Multiple Sites | |
---|---|
Chronicle can host multiple sites and each site can share a theme with other sites or use its own theme. For a specific site, only one theme can be active at a time. |
Configure common aspects of a theme, relative to the theme's folder (represented as
THEMEDIR
below) as follows:
THEMEDIR/layouts/default-layout.phtml
THEMEDIR/views/content/index/index.phtml
THEMEDIR/views/content/index/view-type-<content-type-id>.phtml
.