Latest Tweets:
I adore ExpressionEngine for how robust it is, and how easy it is for me to control content structure, as well as allowing the client to manage virtually every aspect of the site. The EE sites I develop tend to have many intersecting bits and pieces, utilizing category and related content structures quite a bit, as well resource lists, galleries, and other dynamic content types. Ultimately this boils down to (usually) MANY different content types (weblogs, or channels), that force clients to enter only the relevant information for each type of content and not giving them so much control that they ultimately destroy the functionality, design, or both.
One of the biggest challenges I’ve faced is providing robust meta information (<title>, <meta>) control to clients within these ExpressionEngine sites.
There are a few good articles and suggestions about handling meta data, including the SEO: Meta Tags writeup on ExpressionEngine.com, and Leevi Graham’s LG Better Meta extension/plugin combo. However, neither of these really handle PAGE and/or SECTION specific meta data the way I would really like it. Anyone who knows anything about SEO knows that ideally we want to have specific keyword/keyphrase targeted meta data for every unique URL on the site.
From a templating standpoint, I tend to use minimal templates, usually only one index for each main section, and a collection of includes templates. Using segment_1, segment_2, etc., as well as utilizing conditionals, I will structure many areas of a site in one template file. Ultimately this gives me a very dynamic framework while minimizing markup/styling time. Rarely do I use a specific page (with it’s own URL) for a single weblog/channel of any given type. Generally, this is all generated dynamically.
Sure, by employing all my different weblog/channel entries, I can sculpt an automatic meta data structure to be utilized throughout the site. But what happens when the client says “We need to be able to manually optimize our meta data for every page!”?
To answer this, I had to just take a step back and look for the simplest solution. The ultimate solution was to be able to allow clients to add a <title>, and custom <meta> data for any given link/URL on the site. So I started looking at how I could turn Page Meta into a weblog/channel and how I would enable the client to determine what page/link/URL to apply the meta information to.
* Create weblog/channel (meta_headers) with custom fields: title_tag, meta_keywords, meta_description, meta_misc, meta_page_url
* How does the client determine what page/link/URL to apply the meta headers to? Enter the search parameter in weblog/channel entries tags. By using the search parameter, I can filter entries (meta_header entries) by a specific custom field, in this case meta_page_url. This gives the client the ability to assign a meta_header entry to a specific page/link/URL by pasting the specific URL into the meta_page_url custom field.

* Now it’s just a matter of getting our template to pull in the meta_header entries correctly. See the code below for an example:
{if segment_1 == ""} {!-- Homepage only --}
{exp:channel:entries channel="meta_headers" dynamic="off" search:meta_page_url="=http://2010.reoinc.com|http://domain.com/"}
{if no_results} <title>{site_name} {/if}
<title>{if meta_title}{meta_title}{if:else}{site_name}{/if}
{if meta_keywords}<meta name="keywords" content="{meta_keywords}" />{/if}
{if meta_description}<meta name="description" content="{meta_description}" />{/if}
{/exp:channel:entries}
{if:elseif segment_2 == ""} {!-- segment_1 and below --}
{exp:channel:entries channel="meta_headers" dynamic="off" search:meta_page_url="=http://domain.com/{segment_1}|http://domain.com/{segment_1}/"}
{if no_results} <title>{site_name} {/if}
<title>{if meta_title}{meta_title}{if:else}{site_name}{/if}
{if meta_keywords}<meta name="keywords" content="{meta_keywords}" />{/if}
{if meta_description}<meta name="description" content="{meta_description}" />{/if}
{/exp:channel:entries}
{if:elseif segment_3 == ""} {!-- segment_2 and below --}
{exp:channel:entries channel="meta_headers" dynamic="off" search:meta_page_url="=http://domain.com/{segment_1}/{segment_2}|http://domain.com/{segment_1}/{segment_2}/"}
{if no_results} <title>{site_name} {/if}
<title>{if meta_title}{meta_title}{if:else}{site_name}{/if}
{if meta_keywords}<meta name="keywords" content="{meta_keywords}" />{/if}
{if meta_description}<meta name="description" content="{meta_description}" />{/if}
{/exp:channel:entries}
{if:elseif segment_4 == ""} {!-- segment_3 and below --}
{exp:channel:entries channel="meta_headers" dynamic="off" search:meta_page_url="=http://domain.com/{segment_1}/{segment_2}/{segment_3}|http://domain.com/{segment_1}/{segment_2}/{segment_3}/"}
{if no_results} <title>{site_name} {/if}
<title>{if meta_title}{meta_title}{if:else}{site_name}{/if}
{if meta_keywords}<meta name="keywords" content="{meta_keywords}" />{/if}
{if meta_description}<meta name="description" content="{meta_description}" />{/if}
{/exp:channel:entries}
{if:elseif segment_5 == ""} {!-- segment_4 and below --}
{exp:channel:entries channel="meta_headers" dynamic="off" search:meta_page_url="=http://domain.com/{segment_1}/{segment_2}/{segment_3}/{segment_4}|http://domain.com/{segment_1}/{segment_2}/{segment_3}/{segment_4}/"}
{if no_results} <title>{site_name} {/if}
<title>{if meta_title}{meta_title}{if:else}{site_name}{/if}
{if meta_keywords}<meta name="keywords" content="{meta_keywords}" />{/if}
{if meta_description}<meta name="description" content="{meta_description}" />{/if}
{/exp:channel:entries}
{if:else}
{exp:channel:entries channel="meta_headers" dynamic="off" search:meta_page_url="=http://2010.reoinc.com|http://domain.com/"}
{if no_results} <title>{site_name} {/if}
<title>{if meta_title}{meta_title}{if:else}{site_name}{/if}
{if meta_keywords}<meta name="keywords" content="{meta_keywords}" />{/if}
{if meta_description}<meta name="description" content="{meta_description}" />{/if}
{/exp:channel:entries}
{/if}