Difficulty:

Easy

Version:

Expression Engine 1.0: 20040425

The toasty website after this tutorial is complete!

We’re going to start by assuming that you’ve installed Expression Engine successfully. If you haven’t, then you’re not in right place for technical support. Try referring to the installation instructions, or if you’re stuck, the Expression Engine forum for installation problems.

This tutorial is going to show you how to create your own personal webpage using basic HTML, introducing you to the concept of templates and template groups. So login into the control panel, and get ready for some toasty action!

Background Information

This tutorial takes you through the basic process of creating a HTML file within a template and displaying it on screen. Most websites, especially for businesses and other organisations have many things in common; they all have a logo, they’ll all have a heading, some text, a menu, and a footer. In this tutorial, we set about writing our website and the kind of elements it will have. In tutorial 2, we will show you how easy it is to take the results of this tutorial and make it look completely different.

As a site grows, you’re going to have more and more pages, all with the same common elements. This is where Expression Engine can come into its own. Future tutorials will show you how, by converting the content of your pages into a weblog (I use weblog to mean data container, rather than an online diary or journal), you can quickly modify the look of an entire site by just changing a single file.

Then, I’ll show you how you can set-up members so that colleagues, family or friends can write content for your site, leaving you to get on with designing the site.

But first, writing a HTML file…

Instructions

templates

Look at the top right hand of your screen...

Create a new template

This is the screen to create a new template group

Make this site your home page?

Don't worry if you're feeling a little lost to begin with. Expression Engine has a steep learning curve, but it's fun too...


This is what your new template group should look like.

Try as you might, if you're having troubles seeing the blank browser window in this step and keep getting "404 Page Not Found" errors instead, it may be because of a problem with query strings...follow the instructions in the Expression Engine documentation to force URL Query Strings.

This is a breakdown of how Expression Engine URLs correspond to templates and template groups. Note that you can rename your index.php file in apache using a .htaccess file. If you don't specify a template to load, Expression Engine will load the \

The edit button in your template group.

The edit button in your template group.

<?xml version="1.0" encoding="UTF-8"?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

<title>Toast!</title>

</head>

<body>

</body>

</html>

As you write more and more pages, you'll want to make sure that your titles are short and unique. This is because when your page is saved as a favourite, it is the title that is used. A title should be a brief reminder of what's on your page...


An image of my title bar.

The code in green is code that you should have written before. I repeat it to give you a guide as to where to insert the new code...

<body>

<div id="outer">

<div id="header">

<h1>Welcome to my toasty tutorial!</h1>

</div>

</div>

</body>


Your new heading, in all its glory

<h1>Welcome to my toasty tutorial!</h1>

</div>

<div id="content">

<p>This is my website about toast! I love toast. It's the perfect breakfast food. So versatile, and yet warm and yummy. Every morning I put my bread in the toaster, and while it gets toasty I can relax and read a book. Then, as if by magic the toast pops up as if to say "I'm ready to eat". A bit of butter and a dollop of marmite, and it keeps me going all morning.</p>

<h2>What kind of a nutter writes a website about toast?</h2>

<p>Okay, I admit it. This isn't really a website about toast: it's a tutorial on how to use Expression Engine. I needed something to write a website about, and toast sprang to mind. I do really like toast though. May I recommend toasted cinnamon bagels?</p>

</div>

<div id="footer">

<p>Site written by Leonard Murphy.</p>

<p>Site powered by <a href="http://www.pmachine.com">Expression Engine</a> and hosted at <a href="http://www.pmachinehosting.com/" title="Great hosting, excellent prices, friendly service">PMachine Hosting</a>.</p>

</div>

</div>

</body>


If you've got this far, why not leave me a comment with a link to your website to inspire others?

Got something to add? Add your comment to the 7 already made

Written by Leonard on Saturday 1st May 2004