LG Better Meta v1.7.0 Improve your sites SEO with custom page titles, descriptions, robot meta tags, sitemap generator and more.
LG Better Meta 1.7 Commercial
LG Better Meta 1.7 now includes sitemap meta and a search engine site map generator tag! Version 1.7 removes the source code attribution from the 1.4.2 freeware version and fixes a bunch of annoying bugs. Purchase a commercial license for single domain (unlimited sub-domains) and recieve unlimited email support while feelling good about supporting independent ExressionEngine development.
Only $39.95 per license. Register to purchase!
Now including sitemap meta and sitemap generators!
The latest release of LG Better Meta 1.7 is not only Multi Site Manager (MSM) compatible but now includes sitemap meta data and sitemap generator tags. The new version is available for all existing license holders and can be downloaded from your purchases page.
Upgrading from 1.6 or 1.4?
If you are upgrading from 1.6 or 1.4 backup your site and database first! I also suggest you copy your existing settings including the meta template and uninstall the extension (this will not destroy your meta data). Then upload the latest version and re-activate the extension. Be sure to copy your old settings back into the extension where applicable.
There are a couple of other template tag changes, so it's best if you plan for a short period of downtime while you make these changes. Make sure you check the usage documentation and tag reference for more information.
Features
The LG Better Meta extension adds a new tab to the publish and edit tabs of the ExpressionEngine administration. The included plugin renders the individual entry and site meta data, which when used correctly will create SEO optimised pages and search engine sitemaps.
LG Better Meta provides an interface to add the following meta data to a template or weblog entry:
- Author
- Page title
- Page description
- Keywords
- Publisher
- Rights
- Identifier
- Date created
- Date modified
- Date valid
- Instructions for robots
- Site title
- Priority
- Change frequency
The values for each piece of meta data are determined from various pieces of existing content. However they can be overridden on a per entry basis and furthermore by the plugins methods and tag parameters.
The rendering hierarchy of an entries meta is:
Default Extension Settings → Standard Entry Values → Better Meta Entry Settings → Plugin Tag Parameters
Screenshots
Requirements
LG Better Meta is an ExpressionEngine extension & plugin and has been tested on ExpressionEngine 1.6+.
Installation
The LG Better Meta extension contains an extension, plugin and language file. There is also a single image that needs to be added to your cp_global_images folder. To install LG Better Meta follow the instructions below:
- Login and purchase or download the latest version of LG Better Meta
- Extract the .zip file to your desktop
- Copy
extensions/ext.lg_better_meta.phpdirectory to your/system/extensionsdirectory - Copy
plugins/pi.lg_better_meta_pi.phpdirectory to your/system/pluginsdirectory - Copy the
language/english/lang.lg_better_meta.phpfile to your/system/languages/englishdirectory - Copy the
themes/site_themes/cp_global_images/add.pngfile to your/themes/site_themes/cp_global_imagesdirectory - Open the Extensions Manager
- Enable Extensions if not already enabled
- Enable the extension
- Configure the extension settings
Upgrading
The upgrade process should be painless however there are a couple of steps to take:
- Back up your database first!
- Put your site offline
- Delete the existing extension, language and plugin file
- Copy the new version to your site
- Reactivate your site
- For each of your sites resave the extension settings
Extension Configuration
The LG Better Meta extension has the following extension settings which are used as the default values of the {exp:lg_better_meta_pi:template} tag.
Extension Access
Enable extension [required]
Yes|No
Enable LG Better Meta extension for this site?
Member group security[required]
1,2,3
Restrict member groups from seeing the Better Meta tab in the control panel publish / edit form.
Weblog security[required]
1,2,3
Restrict which weblogs display the Better Meta tab in the control panel publish / edit form.
Default Meta Values
The default meta values are used as a base when displaying site and entry meta data. The can be overridden on a per entry basis in the publish/edit form or through the plugin parameters.
Site Author [required]
Leevi Graham
The person or organisation primarily responsible for creating the intellectual content of the website. For example, authors in the case of written documents, artists, photographers, or illustrators in the case of visual resources.
Site Description [optional]
Add meta data to your ExpressionEngine entries using LG Better Meta. Extension and plugin installation, settings and usage instructions.
A textual description of the content of the entry.
Google displays the description in its search results under the page title. To display correctly in google search results the description should be no longer than 150 characters.
Site Keywords [optional]
keywords="LG Better Meta, ExpressionEngine, Extensions, Plugins, Search Engine Optimization, SEO, Newcastle Web Design and Development"
Keywords are not used by any of the major search engines, however they do make you focus on your content.
Typically, the topic will be represented using keywords, key phrases, or classification codes. Recommended best practice is to use a controlled vocabulary.
Site Title[required]
leevigraham.com - Newcastle web design and development
The site title will be appended to the entry title separated by the site page title divider.
Site Publisher [optional]
Leevi Graham Web Design & Development
An entity responsible for making the site content available. Examples of a Publisher include a person, an organization, or a service.
Site Rights [optional]
Content published under Creative Commons Attribution-Share Alike 2.5 Australia license (http://creativecommons.org/licenses/by-sa/2.5/au/)
Information about rights held in and over the site content. Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights.
Site Page Title Divider [required]
- | » . →
The page title divider, divides the site title and entry title.
Sitemap Meta Defaults
Each weblog has its own default sitemap meta defaults. These defaults are used in the {exp:lg_better_meta_pi:entries} tag. Like all the other settings they can be overridden using the per entry settings and the template tag parameters.
Include in sitemap [required]
Yes|No
Display this entry in the {exp:lg_better_meta_pi:entries} tag.
Change Frequency [required]
Always ... Never
How frequently the page is likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page. Valid values are:
- always
- hourly
- daily
- weekly
- monthly
- yearly
- never
The value "always" should be used to describe documents that change each time they are accessed. The value "never" should be used to describe archived URLs.
Please note that the value of this tag is considered a hint and not a command. Even though search engine crawlers may consider this information when making decisions, they may crawl pages marked "hourly" less frequently than that, and they may crawl pages marked "yearly" more frequently than that. Crawlers may periodically crawl pages marked "never" so that they can handle unexpected changes to those pages.
For more information see: http://sitemaps.org/protocol.php#changefreqdef
Priority [required]
0.0 ... 1.0
The priority of this URL relative to other URLs on your site. Valid values range from 0.0 to 1.0. This value does not affect how your pages are compared to pages on other sites—it only lets the search engines know which pages you deem most important for the crawlers.
The default priority of a page is 0.5.
Please note that the priority you assign to a page is not likely to influence the position of your URLs in a search engine's result pages. Search engines may use this information when selecting between URLs on the same site, so you can use this tag to increase the likelihood that your most important pages are present in a search index.
Also, please note that assigning a high priority to all of the URLs on your site is not likely to help you. Since the priority is relative, it is only used to select between URLs on your site.
For more information see: http://sitemaps.org/protocol.php#prioritydef.
Robots
Set the default behaviour of search engine robots.
Index Pages [required]
Yes | No
Instruct search engines to index pages.
Follow External Links [required]
Yes | No
Instruct search engines to follow external links.
Archive Pages [required]
Yes | No
Instruct search engines to archive pages.
Site Meta Template
The meta template is rendered using the {exp:lg_better_meta_pi:template} tag. Variables wrapped in curly braces '{}' are replaced with the corresponding meta values.
Site Meta Template [required]
<title>{title}</title>
<meta name='description' content='{description}' />
<meta name='keywords' content='{keywords}' />
<meta name='robots' content='{robots}' />
<link rel='schema.DC' href='http://purl.org/dc/elements/1.1/' />
<link rel='schema.DCTERMS' href='http://purl.org/dc/terms/' />
<meta name='DC.title' content='{title}' />
<meta name='DC.creator' content='{author}' />
<meta name='DC.subject' content='{keywords}' />
<meta name='DC.description' content='{description}' />
<meta name='DC.publisher' content='{publisher}' />
<meta name='DC.date.created' scheme='DCTERMS.W3CDTF' content='{date_created}' />
<meta name='DC.date.modified' scheme='DCTERMS.W3CDTF' content='{date_modified}' />
<meta name='DC.date.valid' scheme='DCTERMS.W3CDTF' content='{date_valid}' />
<meta name='DC.type' scheme='DCTERMS.DCMIType' content='Text' />
<meta name='DC.rights' scheme='DCTERMS.URI' content='{rights}'>
<meta name='DC.format' content='text/html' />
<meta name='DC.identifier' scheme='DCTERMS.URI' content='{identifier}' />
For more information about DC tags visit the The Dublin Core Metadata Initiative.
Publish/Edit tab settings
The Better Meta publish/edit tab can be customised to show a subset of the meta options. This setting is site wide and cannot currently be customised per weblog.
Show title in admin tab [required]
Yes | No
Show the meta title option in the Better Meta admin tab.
Show description in admin tab [required]
Yes | No
Show the meta description option in the Better Meta admin tab.
Show keywords in admin tab [required]
Yes | No
Show the meta keywords option in the Better Meta admin tab.
Show author in admin tab [required]
Yes | No
Show the meta author option in the Better Meta admin tab.
Show publisher in admin tab [required]
Yes | No
Show the meta publisher option in the Better Meta admin tab.
Show rights in admin tab [required]
Yes | No
Show the meta rights option in the Better Meta admin tab.
Show robots in admin tab [required]
Yes | No
Show the meta robots options in the Better Meta admin tab.
Show sitemap meta in admin tab[required]
Yes | No
Show the sitemap meta options in the Better Meta admin tab.
Check for updates
If you allow it LG Better Meta can call home and check for recent extension updates. This feature requires LG Addon Updater.
Usage
Adding meta data to an entry
To add entry specific meta data to an entry follow these simple steps:
- Create a new entry in one of the weblogs listed in the Weblog IDs extension setting.
- Click the LG Better Meta tab and enter entry specific values.
- Complete the entry and save as normal.
The values entered in the LG Better Meta tab will override the default extension settings where applicable.
Outputting entry meta data
The LG Better Meta plugin outputs the meta information to your site using the {exp:lg_better_meta_pi:template} tag. The tag has many parameters to further customise the meta output.
Simple usage outputs the default meta template using the default extension settings.
<head>
{exp:lg_better_meta_pi:template}
</head>
Outputting entry specific meta
To output entry specific meta you must add either the entry_id= or url_title= parameter to the {exp:lg_better_meta_pi:template} tag.
Lucky for us it is a requirement of the ExpressionEngine templating system that either an entry_id or the url_title in the url for specific entry pages. Knowing this allows us to use segment variables inside the {exp:lg_better_meta_pi:template} tag.
Example 1: A numberic entry id in an entry url.
If you page is using the entry_id to determine the entry use the entry_id parameter.
Example page url: http://leevigraham.com/blog/post/3
<head>
{exp:lg_better_meta_pi:template entry_id="{segment_3}"}
</head>
The above example will create a page title similar to: Entry Title | Site Title
Example 2: A url_title in an entry url.
If you page is using the url_title of an entry to determine the entry use the url_title parameter.
Example page url: http://leevigraham.com/blog/post/foo-bar
<head>
{exp:lg_better_meta_pi:template url_title="{segment_3}"}
</head>
The above example will create a page title similar to: Entry Title | Site Title
Example 3: Displaying a category title and section title.
We need to take a different approach for weblog category archive templates. In the example below we will output the meta for a photo gallery weblog.
Example url: http://leevigraham.com/gallery/category-archive/category/family-pics
<head>
{!-- Get the category information --}
{exp:weblog:category_heading weblog="photo_blog"}
{!-- Overide the default page title with the category name. Add "Photo Gallery" to the page title using the title_suffix parameter --}
{exp:lg_better_meta_pi:template title="{category_name}" title_suffix = "Photo Gallery"}
{/exp:weblog:category_heading}
</head>
The above example will create a page title similar to: Category Title | Photo Gallery | Site Title Goes Here
Example 4: A unique title for your sites homepage.
Your homepage generally will require a unique URL for SEO and to draw the attention of your site visitors.
Example url: http://leevigraham.com/
<head>
{!-- Override the page title and hide the default site title --}
{exp:lg_better_meta_pi:template title="Site Homepage Title" hide_site_title = "y"}
</head>
The above example will render the following page title: Site Homepage Title
Example 5: Adding a section reference to the title using the title_suffix parameter.
On some pages you may want to add a section title to futher add to your sites SEO. In the example below we will add "Blog" to the page title after the entry title.
Example url: http://leevigraham.com/blog/post/foo-bar
<head>
{!-- Get the entry title using the url_title and add "Blog" to the --}
{exp:lg_better_meta_pi:template url_title="{segment_3}" title_suffix = "Blog"}
</head>
The above example will create the following page title: Entry Title | Blog | Site Title
Using LG Better Meta inside embedded templates
More often than not you will want to include an ExpressionEngine header template embed to simplify your templates. This template should include the {lg:better_meta_pi:template} tag. The basic idea is that the {lg:better_meta_pi:template} parameters are passed through the header embed and into the tag.
This may make it hard to pass the exact required parameters to LG Better Meta. To solve this issue LG Better Meta ignores unassigned embed tags.
Embedded Header template
This code should be placed in your embedded header template. Chances are you will not embed all the variables but as mentioned above unassigned variables will be discarded.
<head>
...
{exp:lg_better_meta_pi:template
entry_id="{embed:entry_id}"
weblog_id="{embed:weblog_id}"
url_title="{embed:url_title}"
title="{embed:title}"
title_suffix="{embed:title_suffix}"
title_prefix="{embed:title_prefix}"
hide_site_title="{embed:hide_site_title}"
description="{embed:description}"
keywords="{embed:keywords}"
author="{embed:author}"
publisher="{embed:publisher}"
rights="{embed:rights}"
date_created="{embed:date_created}"
date_modified="{embed:date_modified}"
date_valid="{embed:date_valid}"
identifier="{embed:identifier}"
robots_index="{embed:robots_index}"
robots_follow="{embed:robots_follow}"
robots_archive="{embed:robots_archive}"
}
...
</head>
Entries template
Pass the entry_id and other parameters through to the embedded template.
{embed="your_template_group/header_template" entry_id="{segment_3}"}
Creating Sitemaps
LG Better Meta 1.7 added sitemap meta and with it a powerful new tag: {exp:lg_better_meta_pi:entries}. This tag operates exactly the same as {exp:weblog:entries} accepting the same parameters and rendering the same entry template variables.
This tag has been designed to allow you to output flexible and powerful search engine sitemaps. An example usage of the tag outputting all the entries in the "blog" weblog is given below:
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
{exp:lg_better_meta_pi:entries
weblog="blog"
disable="categories|custom_fields|category_fields|customer_fields|member_data|pagination|trackbacks"
dynamic="off"
rdf="off"
status="not closed"
}
<url>
<loc>http://test.com/blog/post/{entry_id}/{url_title}/</loc>
<lastmod>{edit_date format="%Y-%m-%d"}</lastmod>
<changefreq>{change_frequency}</changefreq>
<priority>{priority}</priority>
</url>
{/exp:lg_better_meta_pi:entries}
</urlset>
Tag Reference
{exp:lg_better_meta_pi:template}
LG Better Meta makes use of two tags each with a different purpose. General page meta is rendered using {exp:lg_better_meta_pi:template} whose output can be customised using any combination of the following parameters:
Parameters
{exp:lg_better_meta_pi:template} accepts the following parameters:
- entry_id=
- url_title=
- title=
- title_prefix=
- title_suffix=
- hide_site_title=
- description=
- keywords=
- author=
- publisher=
- rights=
- date_created=
- date_modified=
- date_valid=
- identifier=
- robots_index=
- robots_follow=
- robots_archive=
entry_id= [optional]
entry_id="1"
The entry_id of a weblog entry.
url_title= [optional]
url_title="this-is-the-entry-url-title"
The url_title of a weblog entry. Hint: Use segment variables so a {weblog:entries} tag is not needed.
title= [optional]
title="This will be prepended to the site title"
The page title will be prepended to the site title separated by the site page title divider.
title_prefix= [optional]
title_prefix="This will be prepended to the entry title"
The title_prefix will be prepended to the page title separated by the site page title divider.
title_suffix= [optional]
title_suffix="This will be appended to the entry title"
The title_suffix will be appended to the page title separated by the site page title divider.
A real world example would be to add categories after the entry title.
hide_site_title= [optional]
hide_site_title="yes"
Hide the site title completely. This is useful on a sites homepage where the site title contains the same keywords as the page title.
description= [optional]
description="Add meta data to your ExpressionEngine entries using LG Better Meta. Extension and plugin installation, settings and usage instructions."
A textual description of the content of the entry.
Google displays the description in its search results under the page title. To display correctly in google search results the description should be no longer than 150 characters.
keywords= [optional]
keywords="LG Better Meta, ExpressionEngine, Extensions, Plugins, Search Engine Optimization, SEO, Newcastle Web Design and Development"
Keywords are not used by any of the major search engines, however they do make you focus on your content.
Typically, the topic will be represented using keywords, key phrases, or classification codes. Recommended best practice is to use a controlled vocabulary.
author= [optional]
author="Leevi Graham"
An entity primarily responsible for creating the entry content. Examples of a Creator include a person, an organization, or a service.
publisher= [optional]
publisher="Leevi Graham Web Design & Development"
An entity responsible for making the entry content available. Examples of a Publisher include a person, an organization, or a service.
rights= [optional]
rights="Content published under Creative Commons Attribution-Share Alike 2.5 Australia license (http://creativecommons.org/licenses/by-sa/2.5/au/)"
Information about rights held in and over the entry content. Typically, rights information includes a statement about various property rights associated with the resource, including intellectual property rights.
date_created= [optional]
date_created="2007-07-16T19:20:30+01:00"
The date the entry was created in W3C Date format.
date_modified= [optional]
date_modified="2007-08-16T19:20:30+01:00"
The date the entry was modified in W3C Date format.
date_valid= [optional]
date_valid="2007-09-16T19:20:30+01:00"
The date the entry is valid to in W3C Date format.
ExpressionEngine provides an easy way to create dates in the W3C format.
identifier= [optional]
identifier="http://leevigraham.com"
An unambiguous reference to the resource within a given context, typically a url.
robots_index= [optional]
robots_index="index"
robots_index="noindex"
Specifying index will result in robots indexing the page while noindex will result in robots not indexing the page.
robots_follow= [optional]
robots_follow="follow"
robots_follow="nofollow"
Specifying follow will result in robots following links on the page while nofollow will result in links not being followed
robots_archive= [optional]
robots_archive="archive"
robots_archive="noarchive"
Specifying archive will result in robots archiving the page while noarchive will result in robots not archiving the page.
{exp:lg_better_meta_pi:entries}
Single Variables
Two new single variables have been added with the {exp:lg_better_meta_pi:entries} tag. They are:
{change_frequency} [required]
How often the page changes.
{priority} [required]
The priority given to this page over other pages in your sitemap.
{exp:lg_better_meta_pi:entries}
Single Variables
{exp:lg_better_meta_pi:entries} accepts the same parameters as {exp:weblog:entries}. It also renders all the same single variables including the following addtions:
- {change_frequency}
- {priority}
For an example how to use the {exp:lg_better_meta_pi:entries} tag see "Creating Sitemaps".
Change Log
Version 1.7.0
- Added sitemap meta data
- Added sitemap output
- Replaced
{exp:lg_better_meta}with{exp:lg_better_meta_pi:template} - Added
{exp:lg_better_meta_pi:entries}to loop over existing meta entries. - Fixed MSM compatibility for masked control panels
- Rewrote the plugin for greater speed and efficiency
- Put the price up to cover development of the extra features
Version 1.6.1
- Integrated LG Addon Updater
- Fixed update script from version 1.4.2+
Version 1.6.0
- Added
title_prefixparameter - Added
title_suffixparameter - Added
hide_site_titleparameter - Added option to disable LG Better Meta on a per site basis
- Fixed some character encoding issues
- Discontinued the 1.4.2 free version due to bugs
Version 1.5.0
- Added MSM Compatibility
- Rewrote extension settings panel
Version 1.4.2
- Fixed issue with other extensions that use tabs
- Added update messages to CP homepage
Version 1.4.1
- Added change log to download
- Added check to see if extension has been enabled when the plugin is used.
Version 1.4.0
- Extension method names changed
- Encoding characters bug fixed
- Editing from pages module bug fixed
- Source Code fully commented in PHPDoc syntax
License
Creative Commons
The free version of LG Better Meta is is licensed under a Creative Commons Attribution-Share Alike 3.0 Unported License. A condition of this license is that all source code attribution must not be removed. If you would like to remove the source code attribution please purchase a commercial license.
Commercial License
For those who want or need to remove the source code attribution from LG Polls a commercial version and license for LG Better Meta is available for purchase. To purchase the module return to the top of the page.
Page created on: Sep 26, 2008
Last updated on: Nov 14, 2008
Enjoy LG Better Meta v1.7.0? Bookmark and share it with others.