Add weight to metatag_context.
Reason: we have support of wildcard in metatag_context, so, for example we have, we can have pathes:
/path-to-something/parh/*
/path-to-something/parh/page1
/path-to-something/parh/page2
/path-to-something/parh/page3
...
/path-to-something/parh/pageN

or even more complex structures.

We can add one global rule of metatags for all pages:
/path-to-something/parh/*

And special rule for page1:
/path-to-something/parh/page1

Parametr weight will be used for applying of the rule, which we need.

Comments

uzlov’s picture

uzlov’s picture

Issue summary: View changes
damienmckenna’s picture

Component: User interface » Context integration
Issue tags: -metatag, -metatag_context, -weight, -wildcard
damienmckenna’s picture

Status: Active » Needs review

Thanks. I'm not going to include this in the 1.5 release as I need to test it out a bit and consider how Context handles its definition selection.

marcelovani’s picture

Here is my solution:
Added the weight to the context UI
The weight is shown when you view the list of contexts by path on admin/config/search/metatags/context


Weight added to the context edit


Weight added to the context by path list

marcelovani’s picture

Simplified sorting

marcelovani’s picture

StatusFileSize
new4.86 KB

I forgot to commit the logic to reorder the contexts on the way out. Attaching patch.

marcelovani’s picture

StatusFileSize
new4.86 KB

Re-rolled the patch

damienmckenna’s picture

Status: Needs review » Fixed
Parent issue: » #2699045: Plan for Metatag 7.x-1.15 release

Committed. Thank you both!

Status: Fixed » Closed (fixed)

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