Short description: Metatag settings cannot be set for each views display (page) separately.

Longer description:

  1. In order for a plugin to be in a default or overridden state, plugin extender should implement defaultable_sections() method. Currently metatag_views_plugin_display_extender_metatags class does not have such method therefore user cannot select overridden state for Metatag settings.
  2. In order for Views to know whether current display has default or overridden values, [defaults][metatag] => array() should be defined in display options (see Views/includes/admin.inc). This seemingly cannot be achieved by options_definition_alter() method, therefore these options have to be bluntly set in init() method of metatag_views_plugin_display_extender_metatags class.

I'm leaning towards bug report rather than feature request because each page display can have unique page title but currently cannot have unique metatag settings per display.

Comments

maijs’s picture

Status: Active » Needs review
StatusFileSize
new825 bytes

A patch against 7.x-1.x branch that solves this problem is attached.

maijs’s picture

Issue summary: View changes

Issue explanation corrected.

damienmckenna’s picture

Very cool work, thank you. I'll review this soon.

maijs’s picture

Issue summary: View changes

Grammar fix.

maijs’s picture

Issue summary: View changes

Grammar fix (again).

damienmckenna’s picture

Status: Needs review » Needs work
damienmckenna’s picture

Status: Needs work » Needs review
Parent issue: » #2341821: META: Plan for Metatag 7.x-1.2 release

Lets get this into 1.2.

Status: Needs review » Needs work

The last submitted patch, 1: metatag_views-settings-per-display-2289139.diff, failed testing.

damienmckenna’s picture

Status: Needs work » Needs review
StatusFileSize
new838 bytes

Rerolled.

damienmckenna’s picture

StatusFileSize
new817 bytes

This appears to work.

damienmckenna’s picture

Status: Needs review » Fixed

Committed. Thanks maijs!

  • DamienMcKenna committed 7a908e6 on 7.x-1.x authored by maijs
    Issue #2289139 by maijs, DamienMcKenna: Allow each Views display to have...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.