There some options for using Foundry. The easiest way is to use a version/package of
LibreCCM which includes Foundry. In this case Foundry is installed in the
/themes/foundry folder. There should also be a second folder named
/themes/foundry-base which includes a basic child theme.
Foundry supports a an parent/child theme approach. This means that the logic
part of Foundry (the XSL part) is only installed in /themes/foundry and
is updated together with the normal upgrades of CCM. A child only contains
the templates, CSS files, static texts and configurations files for a theme. Custom
extensions are not supported yet.
A complete Foundry theme consists of the following top level folders and files:
- conf
- Contains configuration files for the theme
- doc
- Static parts of the documentation of Foundry, for example this text
- fonts
- Web fonts for the theme
- foundry
- This folder contains the logic parts (the XSL) of Foundry. The internal structure is described in the Developer Manual.
- images
- Static images for the theme
- libs
-
Additional JavaScript libraries. jQuery and some other JavaScript libraries are
provided by CCM itself, and can be
included using special elements like the
load-jqueryelement. - scripts
- JavaScripts needed in the theme.
- styles
- The CSS styles for the theme. More information about them can be found in the CSS files section.
- templates
- The layout templates for the theme. A detailed description can be found in the Layout templates section.
- texts
- Static texts for the theme
- user
- Custom extensions (XSL) for theme. Not supported yet.
Foundry also supports a parent – child – grandchild structure. This is
maybe useful
when you have themes which only differ in details like logos but use the same
general structure. Most tags which are used to include resources like images,
CSS files etc. support the attribute origin which can have three
values:
- Not set
- The resource is loaded from the current theme
master- If the current theme is a master/parent theme the resource is loaded from the current theme. If the current theme is a child theme the resource is loaded from the master theme.
internal-
The file is loaded from the
foundry. If the theme is a child theme is file is loaded from the Foundry master in/themes/foundry.
The recommend way for creating a team using Foundry is to create a new child theme:
- To do so create a new theme using the CCM Theme director.
-
Copy the contents of the
themes/foundry-basefolder to the folder created by the new theme inthemes/devel-themedir/. - Customise the theme