New location for custom themes
One aspect of this is to put all of the custom, site-specific files in one directory to facilitate backing up the site, moving the site, and so on. In Tiki 27, the included themes are still in the /themes directory, but it's recommended to put custom theme files in this location if the theme is being developed within the Tiki instance (the files are going to be SCSS-compiled): The "top" files of the theme, mytheme.scss, for example, and newsletter.scss, are now in the New location for custom theme top file ("mytheme.scss")
mytheme/css
directory, moved from the mytheme/scss
directory. Otherwise, each custom theme still has the same sub-directories as the package themes, the same as before.New custom theme files hierarchy
tiki root
|_ themes
|_ mynewtheme
|_ css
|_ mynewtheme.css
|_ newsletter.css (normally generated during SCSS compiling)
|_ fonts
|_ icons
|_ images
|_ mynewtheme_background_image.png (if any)
|_ mynewtheme.png (screenshot thumbnail that displays on Look & Feel admin page)
|_ options
|_ mynewthemeoption
|_ css
|_ mynewthemeoption.css
|_ scss (plus other standard directories if needed)
|_ scss
|_
|_ mynewtheme.scss
|_
|
|
|
|_ templates
|_ sometemplatefile.tpl (if needed)
tiki root
|_
|
|_ themes
|_ mynewtheme
|_ css
|_ mynewtheme.scss
|_ newsletter.scss
|_ fonts
|_ icons
|_ images
|_ mynewtheme_background_image.png (if any)
|_ mynewtheme.png (screenshot thumbnail that displays on Look & Feel admin page)
|_ options
|_ mynewthemeoption
|_ css
|_ mynewthemeoption.scss
|_ ( . . . plus other standard theme sub-directories if needed)
|_ scss
|_
|_
|
|
|
|
|_ sometemplatefile.tpl (if needed)
New location for custom theme CSS files
While the component files of the theme are in _custom/shared/themes/
, when these are compiled, the output CSS files of the theme are generated in
This location works the same as
New file paths in top file
All the file paths in the theme's top file ("mytheme.scss") need to be updated as shown in the Tiki 27 example, below right:
@import "../../base_files/scss/_tiki-bootstrap_functions";
@import "variables-dark";
@import "../../base_files/scss/_tiki-variables.scss"; // Values/definitions for Tiki variables (outside of Bootstrap variables) such as _tiki-selectors.scss.
@import "../../default/scss/variables"; // Bootstrap default variables, with a few Tiki overrides
@import "../../default/scss/variables-dark"; // Bootstrap dark mode default variables
@import "../../base_files/scss/_tiki-bootstrap_layout_and_components";
@import "css-variables"; // Needs to be loaded after default variables to override them
@import "../../base_files/scss/_tiki-pagetop_colors.scss"; // Import if needed to specify top and topbar zone colors in more detail
@import "_tiki-selectors.scss";
@import "../../base_files/scss/external-scripts.scss";
@import "../../base_files/scss/select2-tiki_colors.scss";