exponent-cms team mailing list archive
-
exponent-cms team
-
Mailing list archive
-
Message #00043
Updating themes
Hey all,
I know I sent out a rough draft of a new theming guide and details on the theming engine last week. I thought I'd send out a short how-to for those looking to update existing themes so they don't break anymore, as the docs I sent and pretty lengthy. So I'm going to walk through updating Coolwater as it needs it.
For starters, all that really needs changing and adjusting is the header configuration in the head of your theme. We're using slightly new syntax, but it's still about the same.
Here's what coolwater's headerInfo function used to look like:
<?php
$config = array(
"reset-fonts-grids"=>false,
"xhtml"=>true,
"include-common-css"=>true,
"include-theme-css"=>true
);
echo exponent_theme_headerInfo($config);
?>
Here's what it should look like now:
<?php
expTheme::head(array(
"xhtml"=>true,
"css_primer"=>false,
"css_core"=>array("common"),
"css_links"=>true,
"css_theme"=>true
)
);
?>
The gist of all this:
css_primer is set to false because we have no files "reset" files for this theme.
css_core get passed an array with one item: common, which tells exp to include /framework/core/assets/css/common.css. you can pass it the name of any/all of the files in that directory for inclusion
css_links is set to true which tells exponent to allow passing file paths through the {css} plugin used in views
css_theme tells exponent to auto-include all the files in your theme's css directory.
If you have any questions, feel free to ask them here. I'll be updating and finishing the guides shortly and posting them online.
--
Phillip