5 min read

Introduction

The blogging revolution has changed the nature of the internet and as more and more individuals and organizations choose the blog format as the preferred web solution (i.e content driven websites which are regularly updated by one or more users). The question of which blogging application to use becomes an increasingly important one.

I have tested all the popular blogging solutions and the one I have found to be the most impressive for designers with a little CSS and XHTML know-how is Expression Engine. After spending a little time on the Expression Engine support forums I have noticed that a high number of the support questions are relating to solving CSS problems within EE.

This demonstrates that many designers who choose EE are used to working from within Adobe Dreamweaver (or other WYSWYG applications) and although there are no compatibility issues between the two systems, it is clear that they are making the transition from graphics based web design to lovely CSS web based design.

When you are installing Expression Engine 1.6.7 for the first time, you are asked to choose a theme from a drop-down menu, which you may expect would offer you a satisfactory selection of pre-installed themes to choose from. Sadly this is not the case in Expression Engine (EE) version 1.6.7, and if you have not downloaded and manually saved a theme inside the right folder within the EE system file structure you will be given only one theme to choose from: the dreaded “default weblog theme”.

Once you complete the installation, no other themes can be imported or installed, so you can either restart the installation, opt to select the default weblog theme or start from a blank canvas (sorry about that).

The good news is that the next release of EE (v.2.0) ships with a very nice default template, but the bad news is that you will have to wait a few months longer to get a copy and you will need to renew your license to upgrade for a fee.  Even then you will probably want to modify the new and improved default template in EE 2.0, or you may due to your needs opt to  choose another EE template altogether so that your website does not look like a thousand other websites based on the same template (not good).

This article will demonstrate how to use Cascading Style Sheets (CSS) to improve the layout of the default EE website/blog template, and how to keep the structure (XHTML) and the presentation (CSS) entirely separate-which is best practice in web development.

This article is intended as a practical guide to intermediate level web designers wanting to program with CSS more effectively within Expression Engine, and to create better websites, which adhere to current WC3 web standards. It will not attempt teach you the fundamentals of programming with CSS and XHTML or how to install, use or develop a website with EE. This article will demonstrate how to use CSS to effectively take control of the appearance of any EE template.

If you are new to EE then it is recommended that you consult the book “Building a Website with Expression Engine 1.6.7”, published by Packt Publishing and visiting www.expressionengine.com to consult the EE user guide.

If you get stuck at any time when using Expression Engine you can visit the EE support forums via the man EE site to get help with EE, XHTML and CSS issues and for regular updates, the Elislab EE feed within EE is an excellent source of news from the EE community.

The trouble with templates

Lets open up EE’s default “weblog” template in Firefox. I have the very useful “developers toolbar” add-on installed. You can see the many options which are available lined-up across the bottom of Firefox’s toolbar. When you select “Outline > Outline Current Element”, Firefox renders an outline around the block of the element and is set by default to display the name of the selected element. This add-on features many other timesaving and task-facilitating functions, which range from DOM tools for JavaScript development to nifty layout tools like displaying a ruler inside the Firefox window.

Customizing the Default Expression Engine (v1.6.7) website template

The default template is a useful guide to some basic EE tags embedded into the XHTML, but the CSS should render a more clean and simple to customize design-so lets make some much needed changes. I will not be looking onto the EE tags in this article because EE tags are very powerful and are beyond the scope of this article.

Inside the template module create a new template group and call it “site_extended”. Template groups in EE organize your templates into virtual folders. We will make a copy of the existing template group and templates so all the changes we make are non-destructive.

Customizing the Default Expression Engine (v1.6.7) website template

Choose, do not duplicate any existing template groups, but select “Make the index template in this group your site’s home page?” and press submit. Easy. Next create a new template and call it “site_extended_css” and lets duplicate the site/site_css template. This powerful feature instructs EE to clone an existing template with a new name and location.

Customizing the Default Expression Engine (v1.6.7) website template

Now let’s create a copy of the default site weblog and call it “index_extended”.

Select “duplicate an existing template”, choose “site/index” from the options drop-down list. The first part of the location is “site”/ being the template group and the site/”index” the actual template.

Customizing the Default Expression Engine (v1.6.7) website template

Now your template management tab should look like:

Customizing the Default Expression Engine (v1.6.7) website template

Notice that the index template has a red star next to it.

LEAVE A REPLY

Please enter your comment!
Please enter your name here