Site Blog - Development (v2.0)

15
May ’12

V2 Updates: Theme Manager

One of the more flexible aspects of e107 are themes, the Theme Manager of e107 V2 pre-release demonstrates more user control over layouts and styles while theme.xml allows theme creators to "preset" pages and preferred menu assignments, suggest plugins to install and recreate the layouts as they were originally designed. If that's not enough, most of that provides the ability for administrators to make on-the-fly changes at the push of a button.

Where prior versions of e107 themes use CUSTOMHEADER and CUSTOMFOOTER to apply layouts to CUSTOMPAGES, Version 2 introduces a new theme file, theme.xml, which allows the theme designer to assign pages to layouts but gives Theme Manager the ability to change those pages to different layouts or add pages to others. In theory, a site owner with a 10 page website could create an e107 theme with 10 layouts named One thru Ten and never show their visitors the same layout or graphics twice. Other related information that a designer can suggest through theme.xml are to allow administrators to install plugins that are currently available in the plugins folder and menu activations per layout so that a new site can be installed and easily matched to the preview image. "Use Preset" buttons are accessible through Menu Manager as well.

Theme Manager itself has evolved into a multi page design separating the front-end and administration themes. For front end themes with multiple layouts, the site owner can select the layout that should be used by default for unspecified pages and any other layouts can accept the input of specific page names, or patterns, with the same effect as naming pages in CUSTOMPAGES of theme.php. Themes with multiple stylesheets will have them displayed and available to select as the default front-end stylesheet.

Older and custom themes can still be used though some may need modifications to function properly. Many fancy features of premium themes also require that those plugins or functions to be installed but V2 pre-release is not different from the current version in this respect. For those interested in the overall development of the latest version of e107, developers are hard at work and uploading SVN updates when they are available, please check the V2 changelog for more details.

Comments

20 May 2012
  • e107 Main site administrator
  • e107 Core developer
  • e107 Design Team
Great! Note that $CUSTOMHEADER and $CUSTOMFOOTER are deprecated (but will still function) in v2 in favor of $HEADER and $FOOTER as arrays. Ie. the preferred method is:

$HEADER['home'] = "<div>whatever</div>";
$FOOTER['home'] = "<div>footer HTML</div>";

$HEADER['default'] = "<div>whatever</div>";
$FOOTER['default'] = "<div>footer HTML</div>";


Every effort has been made to ensure that older themes will continue to function as normal.


[ edited 20 May 2012 ]
03 Jun 2012
What's the V2 functions? If will update again? mac make up

You must be logged in to make comments on this site - please log in, or if you are not registered click here to signup