SEO Lite v1.1

I just pushed a new version of SEO Lite to github and it has some added goodies, among other things these parameters:

Parameters

  • url_title; retrieve by url_title (often found as a url segment)
  • entry_id; retrieve by entry_id
  • use_last_segment = ‘yes’; pure magic! (it will use the last segment, this is useful if you have the same header all over the website and you sometimes need to use {segment_2} and sometimes {segment_3}
  • default_title – set the title tag directly (ie. do not get from content) – useful for static pages, main page, etc.
  • default_description – override the description – same as above
  • default_keywords – override the keywords – same as above
  • title_prefix – a string to prefix the title with (per request)
  • title_postfix – a string to postfix the title with (per request)
  • title_separator – this will be added after the title (and padded with space on both sides)

Some Usage Examples

Let’s use this template:

<title>{title}{site_name}</title>
<meta name='keywords' content='{meta_keywords}' />
<meta name='description' content='{meta_description}' />
<!-- generated by seo_lite --!>

yeah I know the {title} and {site_name} are pretty close there, but we’ll fix that with the new title_separator parameter :-)

Frontpage

For the frontpage we just want the site name + the default keywords / description:

{exp:seo_lite}

Will produce this title:

<title>My Site Name</title>
(... + default desc / keywords ...)

Our 404 Page

{exp:seo_lite default_title="404 - Not Found" title_separator="|"}

produces:

<title>404 - Not Found | My Site Name</title>
(... + default desc / keywords ...)

A FAQ Entry

{exp:seo_lite entry_id="{entry_id}" title_postfix="&nbsp;| FAQ" title_separator="|"}

will produce this title for a specific faq entry:

<title>A Question | FAQ | My Site Name</title>

note that the &nbsp; is needed because EE will trim parameters for spaces.

Using SEO Lite with the EllisLab Discussion Forum Module

Edit the forum_global/html_header.html file and replace the title-tag there with:

{exp:seo_lite default_title="{page_title} | {forum_name}" title_separator="|"}

It will output:

<title>The title of the current forum or thread here | Forum Title Here | My Site Name</title>

Of coure you need to run the forums through regular templates for the above to work, but that’s something I’d always recommend doing, unless you enjoy pain.

Implementing SEO Lite in the wiki

Edit wiki_themes//wiki_page.html and replace the title-tag there with:

{exp:seo_lite default_title="{title} | {wiki_name}" title_separator="|"}

It will output:

<title>The title of the current wiki page | Wiki Name Here | My Site Name</title>

Of course for the wiki / forum pages you’ll just get the benefit of keeping it consistent and getting the default keywords / description in there, since there isn’t a way of adding entry-specific keywords/description for these entries (yet)..

MSM Support

I got a couple of comments about MSN support, and although it’s untested I think I’ve implemented support for it. The way it works is that you need an entry in exp_seolite_config for each site, so when you switch to another site you need to visit the SEO Lite control panel and an entry will be added for that site. Then you can start using SEO Lite on that additional site as well.

This way you can have different templates for each site etc.

Suggestions?

Let me know if you have suggestions to added functionality or something you’ve found quirky when implementing it on a site, etc.

Download

Download the latest release here (zip)

SEO Lite – The one calorie SEO addon for ExpressionEngine 2.x

A while back I released DevKit for ExpressionEngine using the module “SEO Lite” as an example. Now this module is ready for download!

Click here to download SEO Lite

Full documentation: SEO Lite documentation

A SEO module for ExpressionEngine – what does it do?

Sure you could add custom fields for this kind of meta data, but SEO Lite makes it cleaner and easier to use for the client.

SEO Lite is a lightweight addon for ExpressionEngine that adds SEO meta data for title, keywords and description for entries on your site, enabling them to rank better in the search engines. It uses a template which you can customize to your needs.

It will add a new tab to the publish entry page called “SEO Lite” where you specify title, keywords, and description for the entry.

If you do not specify anything the original entry title will be used, together with the default values for keywords and description.

Why Lite?

First, it’s very lightweight – you only use one tag to output the template, and this tag uses only one database query to fetch the template, entry title, default entry keywords/description or/and the specific keywords/descriptions for that entry.

So you add the power of SEO optimalization with only one query which should be a good tradeoff and perfect for high-traffic websites.

Second, it’s lite functionality-wise as well. No frills. If you want a more extensive module I recommend NSM Better Meta which is a very good commercial alternative.

The template

The default meta data template looks like this:

<title>{title} - {site_name}</title>
<meta name='keywords' content='{meta_keywords}' />
<meta name='description' content='{meta_description}' />
<!-- generated by seo_lite --!>

This can be edited in the SEO Lite Settings. The only thing that’s replaced by SEO Lite is {title}, {meta_keywords} and {meta_description} and you can use any kind of global variables and EE conditionals in it which should make it pretty powerful.

The Tag

Use this tag in your header template to output the template above:

{exp:seo_lite url_title="{segment_3}"}

The url_title parameter uses {segment_3} to find the entry based on the current url. If you have the entry_id you may also use it like this:

{exp:seo_lite entry_id="{entry_id}"}

Installing the module in a WooTheme

Here’s a video showing how to install the module and use it with any of the WooThemes:

Of course this process will be the almost identical on any site.

ScribeSEO Support In The Works

I’m currently implementing support for ScribeSEO. To get an update when this is ready subscribe to my RSS feed or follow me on Twitter.

Download

Download .zip

Documentation, support, download etc. available over at WeDoAddons.com.

Let me know what you think! :-)

Why the ExpressionEngine community is a better place to be for a single developer

There’s probably a lot of good reasons to go with WordPress, but if you’re a single developer ExpressionEngine might be worth considering. Please allow me to present (*drum roll*) “The Top 10 Reasons The EE Community Is A Better Place To Be For A Single Developer / Entrepreneur”

1. You Don’t Have To Worry About GPL Related Bullsh*t

The GPL discussion is all the rave in the WP community these days. In fact, it has been for a good while and many of largest premium theme providers for WP has already GPL’d their themes – with one notable exception; Chris Pearson, the creator of Thesis, a very popular premium theme. Matt Mullenweg (of WordPress) has criticized this very openly, and it’s now speculated that the only way to solve this is in court.

Anyway, to make my point here ExpressionEngine is as we know a commercial product. Which means that you can create commercial addons, commercial themes, commercial whatever – without worrying about being infected by the GPL virus.

An example; most of the people reading this blog has heard of WooThemes, one of the most successful theme providers for WP. Try to google “WooThemes” and you’ll most likely get this:

WooThemes Google WTF

So someone is selling all their themes as a bundle for $10. And they’re doing it all legally! Because it’s GPL. It’s a scumbag move, sure – but it’s legal. (Sidenote; WooThemes continues to be a very profitable business because of excellent support which is basically what they’re selling – and because most people want to do the right thing I guess, which is buying the themes directly from them of course).

This is not something you have to worry about as an ExpressionEngine developer.

Note; you still have to think about licensing though, as the whole “Brandon-Kelly-Did-I-Really-Creative-Commons-That?”-EEMatrix controversy demonstrated.

2. The Affiliate Program

Being a commercial product ExpressionEngine has an affiliate program. You get the money deposited to your PayPal account each month with personal thanks and gratitude from the ExpressionEngine team.

This point is not to be underestimated. An affiliate program means you can blog and talk about ExpressionEngine and make money from something you would normally do being a part of the community.

Are there a lot of affiliate programs for WordPress? Sure, popular addons like Gravity Forms, most premium theme providers like WooThemes and Thesis have their affiliate programs but that’s not the same – the EE affiliate program is for the CMS itself; everyone working with ExpressionEngine needs to buy a license.

Demand for EE 2.0 is through the roof (so much so they dropped the free version, everyone was paying). And they might as well buy a license after reading one of your blogposts :-)

Click here for more details about the EE affiliate program

3. There’s Money Here – People Are Used To Paying

EE is the choice of professional designers etc. delivering websites to clients. I don’t know about you, but if an addon or theme can save me one hour, it’s definitively worth $60.

People using EE are comfortable with paying for services that save them money or time. As mentioned in the previous point EllisLab dropped the free EE Core version since no one was using it anyway. Most were paying customers.

Some communities consist of people who expect everything to be free. The EE community doesn’t. And that’s good for a third party dev!

4. We Have An Addon Store Just Like Apple

Devot:ee the ultimate addon directory for EE recently opened an addon store enabling developers to sell addons directly on their site. Yeah, just like the AppStore!

Here’s a screenshot of a sales report courtesy of Ryan Masuga:

This means you can create commercial addons, have them listed on the “official” EE addon store and make money without worrying about setting up a webshop etc.

5. You Can Be Famous In Six Months

The WordPress community is huge. I don’t know but there are probably hundreds of relatively known WP developers. The EE community – not so big. About 10 – 20 relatively known developers. If you create 3 addons you’ll be invited to speak at EECI2011, hehe. In six months you can make a dent in the WP community or you can be a f*cking EE rockstar. Your choice.

6. It’s MVC And It’s Easy To Get Started

With 2.0 EllisLab made a great choice of going CodeIgniter all the way. This means that your EE addon is a CodeIgniter module, with helpers, libraries, views etc. EE comes bundles with CodeIgniter, and you can harness the power of the CodeIgniter framework in your EE modules. Nice!

In addition to the CodeIgniter user guide (which is pretty good) there are developer docs for EE and the newly created Development and Programming forum to encourage discussion among developers.

And of course, I can’t write this blog post without plugging my own DevKit addon which is an addon you use in your development environment to create the skeleton of a new addon.. check out this video:

Yup, it’s easy to get started, so give it a go!

7. If You Create Something Nice EllisLab Might Embrace It

Take a look at the Community page on expressionengine.com. Sites like EEInsider, Devot:ee, Show EE, Director-ee etc. are all sites created by third-party devs and taken to heart by EllisLab (creators of EE). It doesn’t even have to be a unique or new idea, just a nice implementation.

Also, it could be argued that some of the most popular commercial addons for EE (Structure, SolSpace’s Tag for instance) in reality is pretty basic functionality that should be added in a CMS (pages/tagging). I don’t know for sure, but I have a feeling EllisLab likes the fact that there’s a commercial sphere around EE and that they don’t want to step on too many third party toes by incorporating this functionality into EE (and therby destroying the market for these third party addons). Of course this is just speculation from my side, and it can be argued this is a bad thing – but for a third party dev this is a good thing^TM .. And yeah, Brandon Kelly’s FieldFrame is just the exception that proves the rule.

If you create something nice you might be featured on ExpressionEngine.com – and if you make a living selling an addon the ellisphant in the room might just let you continue with that.

8. The Twitter Stream Is Actually Maintainable

The #eecms twitter stream can actually be followed and read, without much noise or spam. It’s a nice pace. You take the weekend off, have a couple of beers or enjoy some quality time with the family, then come back and see what happened while you were away. Try that with #wordpress .. it’s more like “grab a coffee and see what happened while you were away” :-p

9. You Can Deliver A Website To Your Client And Then Forget About It

Ok, this last point might be a bit FUD’y but still – I make sure the WordPress blogs I deliver to clients are always kept up-to-date for all eternity. I mean who wants to see this in the Google search results (image courtesy of Pearsonified):

Get cheap pills over at Pearsonified

Everyone doing WordPress knows: you update when there’s a new version out, or else you might be at risk. Belive it or not; it’s not like that with EE. You can actually chill and not worry about these kinds of things happening. There’s very seldom a security patch, and if there is one there’s not enough people using EE for the Viagra mafioso to bother anyway.

Of course, that said, it’s always good practice to upgrade your clients to the latest version anyway, but with EE it can wait until tuesday ;-)

10. There Is No Ten

Do you really need ten reasons? There was only 9, that should be enough for anyone. If I added another reason it’d probably be some standard one about EllisLab’s great support etc.

So let me finish with this; if you’re interested in checking out EE buy a license (don’t bother with the free Zend encoded trial IMHO, buy it and you’ll get the source and be able to debug, see what’s happening under the hood, etc.) – say hello in the forums or in the comments below or to me on twitter, follow the #eecms hashtag – participate in the discussion on Twitter, and of course don’t forget to subscribe to my feed if you enjoyed this post.

What do you think? Are there other benefits about the EE community? Was I a bit too generalizing somewhere? Is WordPress really a MUCH MUCH BETTER CMS AND EVERYONE ELSE MUST DIE? Let me know!