September 2008 Archives

29/09/08 - Step 5) Adding Functionality

Okay, back to the tutorial. Before we go any further, take a look at my chocolate recipe website (told you it was a pants domain name!) and have a good nosey at it. It's built using the tutorials as a basis although I've glossed it up only very slightly.

For prosperity, here's a screenshot: More

06/09/08 - Step 4) Getting The SEO Right

Let's talk SEO as it determines everything non-script related.

We've already discussed urls and have opted for a "url/recipe-id-title.html" structure. The benefit of this is that the keywords (presumably the recipe name) will feature in the URL. Some say it's not important. I prefer nice tidy urls over "url/recipe.php?recipe=1".

So what else do we need? More

05/09/08 - Step 3) Creating The Files - Part 3

So far we've got our template files laid out. We've got a sparse CSS file and we've got the basic pages required, empty but ready to roll.

The first thing to do is fill in the static files: terms, privacy, disclaimer, contact, about.....

You can do this following this file structure:

<?php
$pagetitle="Page title goes here";
$pagekeywords="list, keywords, here";
$pagedescription="Write a page description here";
include "includes/head.php";
echo "<h1>".$pagetitle."</p>";
echo "<p>Page text goes here</p>";
include "includes/foot.php";
?>
$pagetitle is used to define the H1 tag on the page along with the title tag in the head section on the html. $pagekeywords lends itself nicely to the keywords tag and thus the description tag also works in the same manor.

The only PHP files that should now be empty are index.php, recipe.php, category.php and rss.php. Before we fill them, let's sort out htaccess.txt and robots.txt. More

03/09/08 - Step 3) Creating The Files - Part 2

CSS is a wonderful thing, especially combined with templates. By changing the contents of one file, you can roll out changes site-wide (template files and CSS).

This site will make use a CSS template so at this stage, I'm going to set up a very basic style.css file.

The template page will be split into four areas: More

02/09/08 - Step 3) Creating The Files - Part 1

Step 3 will be split into 3 sub-steps. Firstly, I've going to take a look at the basic template system I'm going to use together with the basic pages required. Next I'll look at populating the stylesheet and starting work on a basic template. Finally, I'll look at the htaccess file and robots.txt file, together with the code on the crucial pages.

So, let's delve into the overall directory layout. More