Greenview Church

Thanks to Steven Grant this is more than just one example template - rather Steven has provided 46 templates that drive most of the Greenview Evangelical Church site!

Steven writes:

 
Download the EE Code for Greenview Church

Our church site was my first real implementation with EE. I’d looked at a few CMS like WordPress, ModX, Joomla, Drupal and .net based Umbraco.

If I don’t pick things up quickly then I tend to get quite frustrated and, being honest, give up too easily. However, EE just made sense pretty much as soon as I’d looked at the video tutorials as well as stumbling very quickly on the excellent resources Mike has here on Train EE.

So into the templates themselves.

One of the biggest things I like about EE is global variables and embeds, typically I only have a few user defined global variables like {html_begin} and {html_end} that contain the opening html and head tags as and the closing body and html tag.

Depending on the project I may use other global variables as well but these are my standard ones.

Home Template Group

This group contains only 1 template and within makes use of a few embedded templates. My mast head is embedded in all of the templates, after that I’ve then embedded our jQuery slideshow. I took this approach as I found it easier to debug the slider as a standalone template and not have to worry about everything else round about it. It also means that I can reuse that slideshow elsewhere if I so desire.

I’ve then used some basic if conditionals to offer a little bit of personalisation for logged in users of the site. If one of our editors needed to edit the intro text on a regular basis then I’d probably use something like Low Variables - as it is, we don’t need it. Of course the other alternative (as I’ve done on some sites) is to have that text contained within a weblog but that’s probably overkill to have a weblog/channel for 1 piece of text. Of course you could have it as a global variable as well but then you’d need to open the templates for users who may not be a developer.

I then have 4 content divs that pull content from 3 weblogs, one to pull sermon links, one for service information and the other to pull the next 5 events over the next 7 days (this uses the Solspace Calendar addon). In our last column is our church motto and again I could have use a global variable but I’ve just used plain ol’ html.

About Template Group

The layout of this template is common throughout the site, it’s fairly standard in its functionality but has some wee tweaks where required. The page for elder information uses an if conditional for the segment variable that will display elder profiles from another weblog if the user is on that page.

I’ve made use of the excellent Gyspy addon for common field groups of related documents & websites.

As I mentioned, this layout is particularly common throughout the site and I’ve used another embedded template that pulls in the latest sermons, blog posts and links to the main site RSS feeds

Activities Template Group

This is where I discovered one of my favourite EE bits of code on the index page of this group…the switch parameter being able to change the class on an entry on a bespoke CMS used to take me ages, the switch parameter did away with that for me.

Resources Template Group

This group is probably the most intense because of the content.

The index template is just static html that won’t change, again, if regular updates were needed, I’d use the Low Variables addon.

I could probably refine my audio section into 1 template for single, multiple, archive and category pages rather than 3 individual templates I have presently. I only realised the true power of conditional segments when I started building a bug tracker in ExpressionEngine. The same could be said of the blog in this template group.

Looking at the audio template, it uses the FLV addon to create a nice little Flash based audio player. I was concerned about the accessibility of the Flash player, especially for those iPhone (and now iPad) users and so gave the option to download the mp3 file directly.

I’ve also used the Pagination Style addon to make the pagination that wee bit nicer, the only downside is that you need to make a few line changes to one of the core EE files but it works like a dream.

The only other thing within that template is the comment submission form and comment entries tag that allows people to comment on the sermon (these undergo approval before they go live).

I’ll touch on the nav for this template group as well as it’s pretty mammoth. It uses a series of if segment conditionals to spit out an unordered list. I have to say this was particularly confusing for me making sure my closing ifs were in the right place to keep my lovely css tree directory. Again, this could have been simplified if I had opted to use 1 template file for audio, rather than several.

Calendar Template Group

I’m still working my way around this as it’s a new addition to the site. One of the biggest hurdles we faced from the off was events, repeating events, multi-day events etc. from within EE. I did use the default calendar option until Solspace released this addon. It makes it incredibly easy now to set repeating events (without having to clone an entry) whilst adding easy exclusion/inclusion dates.

The code for the templates here isn’t a kick in pants off the default examples provided by Solspace. A word of warning though if you are going to use this addon, I have noticed some errors in the example code where it won’t return events. With their excellent forum help though we’ve worked around them. There are known issues with some events not outputting to ICS properly but I’m sure these will get ironed out.

To Conclude

I’ve learned a lot since this first implementation and with a redesign later this year, I’ll probably do things in a different way, particularly using segment conditionals to minimise the number of templates within my groups.

There’s probably quite a few things that more experienced EE devs could do to improve but hopefully some of my templates will help newbies.

Any comments, questions or suggestions are more than welcome.

Thanks,
Steven Grant
http://www.digitalevangelist.net
http://twitter.com/stevieg_83

Category Navigation

<< Previous Entry   

Next Entry >>

 

Add Your Comment

Commenting is not available in this channel entry.

Unless otherwise stated all content is © Michael Boyink of Train-ee.com & Boyink Interactive. Please don't steal - I've got kids to feed...

dy>