Requirements
Technical requirements include:
- ExpressionEngine 2
- NSM Morphine addon
- PHP 5.2+
- A modern browser: Firefox, Safari, Google Chrome or IE8+
Installation
- Download the latest version of NSM Better Meta.
- Extract the .zip file to your desktop
- Copy
system/expressionengine/third_party/nsm_better_metatosystem/expressionengine/third_party - Copy
themes/third_party/nsm_better_metatothemes/third_party(you may need to create thethird_partyfolder) - Install NSM Morphine addon
Sample templates
The download includes sample templates to kick start your implementation. The templates use the embedded header technique.
- Copy
system/expressionengine/templates/nsm_better_meta.groupto your template directory - Edit each template and update the
{preload_replace:this_page_channel="news"}tag at the top of each template. Set the value to an existing channel. - Synchronise the templates
- Browse to http://yoursite.com/index.php?nsm_better_meta
Activation
- Log into your control panel
- Browse to
Addons → Extensions - Enable all the NSM Better Meta components
- Configure the extension settings
Configuration
Extension settings
Channel preferences
Each channel can be individually configured to display only the relevant options in the meta data tab, or disable the meta data tab entirely. The following options are shown for each channel:
- Field customisation
- Determine which custom meta fields will be shown in the Better Meta tab for the current channel.
- Include entries in sitemap
- Specifies whether this channel's entries should be shown in the sitemap generated by the
{exp:nsm_better_meta:entries_xml}template tags. - Change frequency
- How frequently the content of your channel's pages are likely to change. This value provides general information to search engines and may not correlate exactly to how often they crawl the page.
- Priority
- The priority of entries in this channel relative to other entries on your site
Default site meta
Default site meta values will be used as base values when displaying meta. Loading entry specific meta will override these values with the exception of site title. The site title will be appended to the template specific meta title.
Standard attributes
- Site title
- Appended to the end of the entry title. Hide the site title using the
hide_site_titleparameter. - Page title divider
- The page title divider divides the site title and entry title. Pipe characters "|" will automatically be replaced with the selected page title divider character.
- Description
- The site description. 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
- The site keywords. 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
- 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.
- Publisher
- An entity responsible for making the site content available. Examples of a Publisher include a person, an organisation, or a service.
- Rights
- 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.
Geolocation defaults
Geo meta tags describe the position of the resource described in the entry. As the vast majority of entries will originate from the same location, you can save time by specifying a default location and only overriding it when necessary.
- Region
- The site region is a combination of country code and region code (joined with a dash "-") as defined by ISO3166-1 & ISO3166-2.
- Placename
- The site place name is a name as defined by the Getty Thesaurus of Geographic Names.
- Latitude
- Latitude is defined using numerals that have a precision to 6 decimal places. For example, "-32.9167" is a valid geocode latitude value. Precision beyond the 6 decimal places is ignored.
- Longitude
- Longitude is defined using numerals that have a precision to 6 decimal places. For example, "151.7667" is a valid geocode longitude value. Precision beyond the 6 decimal places is ignored.
Robot defaults
Set the default behaviour of search engine robots when crawling your site.
- Index entry
- Allows or disallows the search engine crawler to index your site's pages.
- Archive entry
- Allows or disallows the search engine crawler from following links on the current page to find more pages.
- Follow external links
- Allows or disallows the search engines from archiving the content on the current page.
Metadata template
The metadata template is the HTML code that will be output into your document when using the {exp:nsm_better_meta:template} template tag. The following tags are available for your use in the template:
- {title}
- {language}
- {description}
- {keywords}
- {author}
- {publisher}
- {date_created}
- {date_modified}
- {date_valid}
- {publisher}
- {rights}
- {canonical_url}
- {robots}
- {region}
- {placename}
- {latitude}
- {longitude}
The tags above can also be used to conditionally include or exclude portions of the template, eg:
{if description}
<meta name="description" content="{description}"/>
{/if}
Updating LG Better Meta
It is possible to update LG Better Meta to NSM Better Meta if you carefully follow the instructions below. Thanks to John at expressionengineering.com for the contribution.
You'll still need a new license for the EE2 version, with license fees being used to develop more addons for the community.
Preparing EE1 for the upgrade
The following steps must be taken before you upgrade ExpressionEngine 1 to ExpressionEngine 2:
- Backup everything.
- Copy the LG Better Meta extension settings for each site to a file. You'll need to re-enter these later.
- De-install the LG Better Meta. This leaves all your entry meta intact, but destroys the extension settings.
Installing EE2
After you've prepared your EE1 install:
- Install and update ExpressionEngine2
- Install NSM Better Meta following the installation instructions
- Re-enter the LG Better Meta extension settings for NSM Better Meta
Migrate LG Better Meta data
Once you've successfully installed NSM Better Meta the LG Better Meta data can be migrated.
- Backup everything again
- Download the migration SQL script
- Run the migration script in PHPMyAdmin, SequelPro or similar