Allow view mode switching by context through a context plugin instead of global configuration form.

Comments

dman’s picture

Related by title (though not by task)

I discovered that this module didn't fire correctly if I tried to use it with a context 'sitewide global' trigger. (7.x-1.2, not tried -dev yet sorry)

I believe this may be hard/impossible to fix in the current code as :

At the point that the node is being rendered (and thus decides which display to use) the 'sitewide' context flag has not yet been set. In my site anyway.
So it just failed.

My workaround was to use a different context trigger : node type is X : and that worked OK, and was semantically similar enough for my needs at the time.
I can't see a good way around that (it's deep in context internal order of operation), so I thought I'd just raise a warning that
"this may be incompatible with the 'sitewide' context trigger"

It may be that switching the processing to a context reaction as in this issue could resolve it.

sherakama’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
Issue summary: View changes
sherakama’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Active » Needs review

This re-factor work has been finished in the 3.x branch.

A review would be helpful.

Thanks.

sherakama’s picture

Status: Needs review » Closed (fixed)
sherakama’s picture

Status: Closed (fixed) » Fixed

Status: Fixed » Closed (fixed)

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