Changing the design

The three options for your site's design

  1. You can leave everything as it is. Then, your site will look like demo.awf-cms.org.
  2. You can just change the stylesheet but not the template itself. The filename of the stylesheet for the default template templates/designs/awf2.html.tpl is css/awf2.css. That is a good option for the start, as stylesheets are very powerful tools in XHTML and actually determine how a site looks. All the different Mediawiki skins work like this, for example.
  3. You can change both, the template and the stylesheet. This will be lots of work, and is only recommended if you are an expert, or if you don't wanna use XHTML but normal HTML templates generated with a software like Frontpage.

To learn about, how a template looks and what variables you can use, it's best to have a look into the default template. The most important object is $awf - using that as starting point, you can access almost every variable and method of AWF (a method is a function of an object, like $awf->init() - variables like $awf->cms->request_string don't have the brackets at the end).

Location and naming conventions of templates

The main templates are supposed to be located in templates/designs/, but the actual path depends on the configuration in inc/design/Design_Name.ini. AWF templates for the HTML output format always have the extension ".html.tpl" - if you also want to provide a WML version of your site, you would have to create a second template with the same basename but the extension ".wml.tpl".

How to create a completely new design


delimiter = " - "
template  = designs/awf2
css       = css/awf2.css

<div id="main">
{$content}
</div>

<head>
<title>{$page_title}</title>
<meta name="charset" content="{$charset}" />
<meta name="generator" content="AWF-CMS.org" />
<meta name="description" content="{$metadata.description}" />
<meta name="keywords" content="{$metadata.keywords}" />
</head>

<link rel="stylesheet" type="text/css" href="{$design.css}" />

{foreach name=outer item=module from=$modules.left}
  <div class="panel">
    <h4>{$module.caption}</h4>
    {$module.content}
  </div>
{/foreach}

#main {
  margin: 0.5em 17em 0 17em; 
  padding: 2.0em 0;
  min-height: 30em;
  }

.panel {
  margin: 1em 0 0; 
  padding: 1em 1em 0 3em; 
  border: 1px dotted #FFF;
  }

PDF version

Created: 08.01.2006 23:12 CET, Last Change: 24.01.2006 14:20 CET by admin

Login

or create a new account

Username


Password