Pixelate
Active member
- Oct 16, 2019
- 257
- 76
- 28
You can easily start a new theme by duplicating the original "altum" theme, and then referencing it so it's chosen as the site theme. This is the thing for front end / admin page layouts, not the biolink themes.
- Duplicate "altum" theme, which is located in "product/themes/altum"
- Give new theme a name ie) "greenery" so it's "product/themes/greenery"
- change the "init.php" file which determines which site theme is loaded, which is found in "product/apps/init.php" to reflect theme change.
NOTE: There are a couple of places where there is "Altum" so be careful about doing a Find & Replace. Specifically keep all the "ALTUMCODE" word and don't change two other places on the page.
Likely the "Altum core" doesn't matter but I've only change the locations where it's related to the template name.
- Duplicate "altum" theme, which is located in "product/themes/altum"
- Give new theme a name ie) "greenery" so it's "product/themes/greenery"
- change the "init.php" file which determines which site theme is loaded, which is found in "product/apps/init.php" to reflect theme change.
Code:
const ALTUMCODE = 1;
define('ROOT_PATH', realpath(__DIR__ . '/..') . '/');
const APP_PATH = ROOT_PATH . 'app/';
const PLUGINS_PATH = ROOT_PATH . 'plugins/';
const THEME_PATH = ROOT_PATH . 'themes/altum/';
const THEME_URL_PATH = 'themes/altum/';
const ASSETS_PATH = THEME_PATH . 'assets/';
const ASSETS_URL_PATH = THEME_URL_PATH . 'assets/';
const UPLOADS_PATH = ROOT_PATH . 'uploads/';
const UPLOADS_URL_PATH = 'uploads/';
const CACHE_DEFAULT_SECONDS = 2592000;
NOTE: There are a couple of places where there is "Altum" so be careful about doing a Find & Replace. Specifically keep all the "ALTUMCODE" word and don't change two other places on the page.
Code:
/* Autoloader */
spl_autoload_register (function ($class) {
$namespace_prefix = 'Altum';
$split = explode('\\', $class);
if($split[0] !== $namespace_prefix) {
return;
}
/* Altum core */
if(isset($split[1]) && !isset($split[2])) {
require_once APP_PATH . 'core/' . $split[1] . '.php';
}
Likely the "Altum core" doesn't matter but I've only change the locations where it's related to the template name.
Last edited: