ee-garage.com

{exp:nsm_better_meta:template}

{exp:nsm_better_meta:template
([
    int entry_id
    string url_title
    string title
    string title_prefix
    string title_suffix
    string hide_site_title
    string description
    string keywords
    string author
    string publisher
    string rights
    string date_created
    string date_modified
    string date_valid
    string identifier
    string robots_index
    string robots_follow
    string robots_archive
    string canonical_url
    string region
    string latitude
    string longitude
])}

This tag renders the metadata template in your template replacing the placeholder tags with their corresponding meta values.

Without any parameters this tag will render the default site meta. To render entry specific meta the entry_id or url_title parameter must be included. Refer to the tutorial documentation for implementation examples.

Parameters

entry_id [optional]

entry_id="1"
// Get the Entry ID from the URL
entry_id="{segment_3}"

The entry id of the target channel entry. To display entry specific meta either entry_id or url_title is required.

url_title [optional]

url_title="some-page-url-title"
// Get the URL title from the URL
url_title="{segment_3}"

The url title of the target channel entry. To display entry specific meta either entry_id or url_title is required.

title [optional]

title="NSM Better Meta"

Overrides the entry title and is prepended to the site title, separated by the page title divider.

title_prefix [optional]

title_prefix="New"

The title prefix will be prepended to the meta title separated by the page title divider.

title_suffix [optional]

title_suffix="Documentation"

The title suffix will be appended to the meta title separated by the page title divider.

hide_site_title [optional]

hide_site_title="y|n"

Remove the site title from the title meta element.

Example: The site title is: "Newism Web Design & Development". Using the the title, title_suffix and title_prefix parameter values above the output would be:

New | NSM Better Meta | Documentation | Newism Web Design & Development

Adding hide_site_title="y" to the template tag would produce:

New | NSM Better Meta | Documentation

See Render homepage specific meta for another example.

description [optional]

description="Add meta data to your ExpressionEngine entries
using NSM Better Meta."

Override the entry or default meta 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 [optional]

keywords="NSM Better Meta, ExpressionEngine, Extensions, Plugins, 
Search Engine Optimisation, SEO, Newcastle Web Design and Development"

Override the entry or default keywords meta.

author [optional]

author="Leevi Graham"

Override the entry or default author meta.

publisher [optional]

publisher="Newism Web Design & Development"

Override the entry or default publisher meta.

rights [optional]

rights="Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported 
license (http://creativecommons.org/licenses/by-nc-sa/3.0/)
unless otherwise stated"

Override the entry or default rights meta.

date_created [optional]

date_created="2007-09-16T19:20:30+01:00"

Override the entry or default date created meta. This value must be in the W3C date format.

ExpressionEngine provides an easy way to create dates in the W3C format.

date_modified [optional]

date_modified="2007-09-16T19:20:30+01:00"

Override the entry or default date modified meta. This value must be in the W3C date format.

ExpressionEngine provides an easy way to create dates in the W3C format.

date_valid [optional]

date_valid="2007-09-16T19:20:30+01:00"

Override the entry or default date valid meta. This value must be in the W3C date format.

ExpressionEngine provides an easy way to create dates in the W3C format.

identifier [optional]

identifier="http://newism.com.au"

Override the entry or default identifier. The identifier value is an unambiguous reference to the resource within a given context, typically a URL.

robots_index [optional]

robots_index="y|n"

Specifying index will result in robots indexing the page and displaying it in search engine ranking pages while noindex will exclude the page.

robots_follow [optional]

robots_follow="y|n"

Specifying follow will result in robots following external links in the page while nofollow will result in links not being followed.

robots_archive [optional]

robots_archive="y|n"

Specifying archive will result in robots archiving the page while noarchive will result in robots not archiving the page.

canonical_url [optional]

canonical_url="http://example.com/blog/{entry_id}/{url_title}"

Override the canonical URL. If your site has multiple URLs showing the same content, you should designate a particular URL to be the canonical (i.e. authorised and true) reference. This is used by search engines so that instead of distributing the content relevance among multiple URLs, they will all be collated to the canonical form.

region [optional]

region="AU-NSW"

Override the resource region. For more information on geolocation, see Geolocation meta defaults.

placename [optional]

placename="Newcastle"

Override the resource placename.

latitude [optional]

latitude="-32.9167"

Override the resource latitude.

longitude [optional]

longitude="151.7667"

Override the resource longitude.

{exp:nsm_better_meta:entries_xml}

{exp:nsm_better_meta:entries_xml
([
    string loc,
    string use_page_url,
])}

This tag renders an XML sitemap directly to the template. Refer to the "Render an XML sitemap" tutorial for implementation examples.

Parameters

This tag accepts all the parameters available in {exp:channel:entries} tag with the following parameter defaults:

disable="categories|custom_fields|category_fields|member_data|pagination"
dynamic="off"
limit="500"
rdf="off"

Additionally the tag also accepts the following extra parameters:

loc [optional]

loc="/blog/post/{url_title}"

The loc parameter is used as the value for the <loc> XML element. It points the entry URL and can include variable placeholders that will be replaced with entry specific values. The following variable placeholders will be replaced:

  1. {entry_id}
  2. {url_title}
  3. {site_id}
  4. {channel_id}

use_page_url [optional]

use_page_url="yes"
use_page_url="no"

If the entry has a page url (Pages & Structure module) then you can choose to override the loc parameter value.

Releases RSS Feed © Copyright 2017 | Policies All prices shown are in Australian Dollars ($AUD) Newism