One Of Us Creative Writing Website. "Use the web to help your creative writing."

 

Page 2 of 5 pages for this article  <  1 2 3 4 >  Last »

How I Built One Of Us with Expression Engine

Template organisation

I have three template groups that I use for my site. The first is the “oneofus” group which was set up as part of the static pages module. The second is the “homepageblog” group which handles the homepage blog and all of its bits and pieces (permalinks and comments etc.) The third is the search template group.

The oneofus group has 2 templates in that I use; content and 404. The index template is just the default one that I haven’t deleted yet. All of the pages managed by the static pages module is managed through this one template. I’ll tell you more about that in detail later. This is what the oneofus group of templates look like in the control panel:

Click on the image to view a larger version.
Content blog templates

The homepageblog group has 3 templates that I use; index, which controls the blog page itself (and acts as the site’s homepage), permalinks, which manages the full entries and archives which manages the archive. Here’s what the template list looks like in the control panel:

Click on the image to view a larger version.
Homepageblog templates

The content template is there by mistake (I told you this setup wasn’t perfect) and the style is from when I had a separate stylesheet for the homepage and content. I later found out how I could use a stylesheet from another weblog and had the content template use the one from the homepageblog.

I don’t use the comments or comments_preview templates that EE comes with as default as the comments are accessed directly from the permalink page and I don’t have a comment preview function. I simply copied the bits of the comments template that I needed into the permalinks template. This was pretty easy and I’ll show you the whole template code later.

I also use the results template from the search results template group. Here’s what the template list looks like in the control panel:

Click on the image to view a larger version.
Search templates

What I would recommend is that you keep the templates in the template group “site” as they are in the default install. This way you can refer to the code in them and see how the tags can be used. Treat them as a working example that you can build upon.

Plugins

Before I launch into the template code in detail, I want to tell you about the EE plugins that I use on my site.

Magpie RSS Parser

On the homepage, I have a little box-out area with the latest forum posts from my forums. My forum software can output the latest posts as RSS feeds. I installed the Magpie RSS reader plugin and pulled in the 3 latest posts. This serves to pull users into the forums directly from the homepage.

The news page calls in RSS feeds from various sources (make sure you ask for permission first), giving the website some constantly fresh content. This is one area of the site that I plan to expand further.

I also use RSS feeds on other content pages such as the writing exercise page.

Allow EE code

I installed this to let me call in RSS feeds using the Magpie RSS Parser from within any post on the site. Even though this may open up security holes I didn’t consider this a risk as I’m the only person editing the site.

Posted by oneofus on 27 September at 10:19 AM

Page 2 of 5 pages for this article  <  1 2 3 4 >  Last »