Once this patch lands:

http://drupal.org/node/904416#comment-6541140

to have Context query string conditions, it would be super handy to update the metatag_context module to allow for the query string configuration directly on the metatags by path page (admin/config/search/metatags/context) rather than having to go to the Context configuration to add the query string conditions configuration.

I did apply the patch and was able to configure the meta tags for paths with query strings (e.g. mypage?page=1) via the Context configuration which is useful, for example, if you don't want to have duplicate meta tags on your pager pages.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Kristen Pol’s picture

Issue summary: View changes

Updated issue summary.

Kristen Pol’s picture

Issue summary: View changes

Updated issue summary.

Chris Gillis’s picture

Component: Context » User interface
Issue summary: View changes
Status: Postponed » Active

#904416: Allow path contexts to handle query string has landed. Kristen, do you think you could describe the approach you took?

DamienMcKenna’s picture

Component: User interface » Context integration
DamienMcKenna’s picture

This would also need to define a minimum version requirement for the Context module in the metatag_context.info file.

jmsosso’s picture

Here is the patch!

Also changed the context dependency to 3.2 because that is the version where #904416 is commited.

jmsosso’s picture

Patch updated because the option Require all conditions must be checked if the user adds any query string condition. If not, query strings are ignored because context module match the path and stops evaluating conditions.

jmsosso’s picture

Sorry, me again :)

I forgot to remove the query_string setting if the user leave the field empty.

DamienMcKenna’s picture

Status: Needs review » Needs work

Thanks jmsosso, I appreciate the work.

I'd prefer to not have the requirement on a specific version of Context for this, so could you please undo the change to the info file? Thanks.

jmsosso’s picture

But if context isn't at least in 3.2 the query_string input will be ignored. This can be confusing for the users... are you sure?