5

I think that's just the way they have set up the templates in the example, so what you're doing is just fine (using {% block %}), if that's how your templates are set up. The difference is by using {% set %} you are just setting your content to a variable which would be {{ echoed }} into the layout file that you extend. Whereas using {% block %} you are ...


3

tldr; Use as many Element Metadata fields as you need unique mappings between your Elements and your metadata. You can replace an existing Element Metadata field with a new one without losing data, but it will depend on the field settings of the old and new field. A single Element Metadata field as a starting point A single Element Metadata field across ...


3

In general, I feel the field types in the current version Sprout SEO (2.x) are overused. We're currently working on a big update that should help resolve this but the field types are really only needed if you are doing advanced SEO work and need to have the ability to modify your SEO values to be different than other field values that already exist on your ...


3

The problem you're running into is that FeedMe doesn't know how to import into custom element types; I think a special hook would need to be written. If you use my SEOmatic plugin it has a FieldType that lets you choose what fields to pull things like the title, description, etc. from which solves this problem. Check out the section of the wiki docs on SEO ...


2

This issue came as a result of the MySQL DB sql_mode including the NO_AUTO_VALUE_ON_ZERO mode which affects how auto_increment columns work. When trying to create a new row entry it will only auto_increment if null is passed. Full explanation here: http://dev.mysql.com/doc/refman/5.7/en/sql-mode.html#sqlmode_no_auto_value_on_zero This setting matched with ...


2

I wrote the Retour plugin; it will definitely work. However it only kicks in after 404 error is thrown by Craft. So if some route resolves to the URL in question, it won't kick in (because, by definition, it is then not a 404)


2

Could you please let us know where do you output the {% sproutseo 'optimize' %}tag? The {% do craft.sproutSeo.meta({ tag need to be called before the optimize tag. I'll give you a basic example of how you can do this: Let's say that you have a _layout where you have the html head tag: <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml" ...


2

The error "Variable "entry" does not exist means that your current page does not have a variable called entry available. This probably means the problem lies in how you have your Sections or routing set up. If you remove Sprout SEO from this page and just try to access entry.title in your template, you will probably receive the same error. So, it will be ...


2

Sprout SEO is a conjunction of different fields when you save an entry it will send the values from the Sprout SEO field (title, description, ogImage, etc..) in the 'metadata' namespace. So, in order to override this value, you can follow the next example: craft()->on('entries.onBeforeSaveEntry', function(Event $event) { $entry = $event->params['...


2

Sprout SEO is running the Craft provided ResaveElements task when you save the field. The same ResaveElements task will run if you resave your Section as Craft needs to make sure that if you updated the URL of a section that it saves the right URLs to the database for all entries. (Sprout SEO is doing something similar making sure it has saved metadata ...


1

We were able to recreate your issue. The error caused by an older version of Twig. The error should be fixed by upgrading to Craft 2.6.2771


1

If you're using the Pixel & Tonic Contact Form plugin then there is a way to set your redirect using {{ redirectInput('contact/thanks') }} as seen here: https://github.com/craftcms/contact-form However, I've just noticed you've tagged this question with plugin-sproutseo, but I'm not aware of that plugin interacting with contact forms in any way. To ...


1

This was a bug and has been resolved in Sprout SEO v4.0.0-beta.10. You can update via the Plugin Store.


1

For any Elements that do not have URLs, like Tags or Users, you'll need to tell Sprout SEO what metadata to use. Also, be sure that the do craft.sproutSeo.meta tag comes before the {% sproutseo 'optimize' %} tag. The do tag prepares the metadata for the optimize tag to process: {% do craft.sproutSeo.meta({ section: 'Self Help Tips', title: tag.title, ...


1

Since Craft is mainly build for developers why don't you create your own plugin? From my experience Craft is a time saver all over the place and when you compare the time you need to build a complex non blog site with Craft and WP - Craft will win for sure unless you are going to build sites for less than 100$ with existing themes without writing a single ...


1

Try setting your seo-field like so: $entry->getContent()->seo = ... instead of $event->params['entry']->seo = ...


1

I didn't understand Ben's answer, and I just needed to output an entry's SEO meta title with a fallback to the entry title in a for loop. Maybe this will help someone in a similar situation: {% for entry in entries %} {% if entry.sproutSeoElementMetadata.title %} {% set title = entry.sproutSeoElementMetadata.title %} {% else %} {% ...


1

So to update this question incase someone happens to stumble across it. With Sprout SEO you need to enable the Enable custom metadata variable option under 'Advanced' in the settings menu. From there I set a twig variable with the value of my metadata title, in this case {%- set metaTitle = entry.metadata.title -%} and attach it to my AJAX wrapper element ...


1

To manage global meta data settings, we recommend using the Meta Defaults. They have all the supported fields and can be accessed by admins in the Control Panel. The Sprout SEO Meta fields only work with Entries right now, so unfortunately, the data they store will not be usable if they are added to a Global Set. While I understand these following items ...


1

To override the Default meta data with your field type the only addition you need in your code is to pass the entry.id to your craft.sproutSeo.meta tag: {% do craft.sproutSeo.meta({ id: entry.id, default: 'default', title: entry.title, description: entry.body|striptags|slice(0, 160) }) %} Once you identify the entry.id Sprout SEO will ...


1

The SEO Divider setting will be used if you select the "Append Site Name to all Titles" setting on the Basic SEO tab of your Default, and then override your title via code or a Meta Basic Field type. For example, if the pipe character is selected as the divider: Code Override Blog Post Name | Website Name Meta Basic Field Override Title Value | Website ...


Only top voted, non community-wiki answers of a minimum length are eligible