Skip to content

Instantly share code, notes, and snippets.

@jamiepittock
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jamiepittock/9749399 to your computer and use it in GitHub Desktop.
Save jamiepittock/9749399 to your computer and use it in GitHub Desktop.
Better Meta overrides
// Global template
{exp:nsm_better_meta:template}
// Page template
{embed="_embeds/start"
entry_id="{entry_id}"
description="Bar"
}
@jamiepittock
Copy link
Author

What I'd expect...

If the extensions's fieldtype description field is blank, use the embed:description variable. If that's blank, use the default description from settings.

If the extension's fieldtype description field has content, that should be used.

What I get...

The embed:description seems to trump everything.

@jamiepittock
Copy link
Author

Updated the gist slightly to hopefully better explain...

On the publish page under the NSM Better Meta tab I add "Foo" to the description field.

In the template I add an embed:description variable with the value "Bar".

This gives me a description meta tag with the value "Bar".

I was expecting "Foo" because I want the embed:variable to be the default with the option to override it via the publish page.

Everything's working so I guess it's just expected behaviour.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment