# Summary

Context module is used to display different page elements, often blocks, on different pages.

There is an alternative module named Block Visibility Groups that is similar to the block placement reaction in the Context module but works more in conjunction with the existing blocks system.

You can read more about this module on its project page or watch a screencast about it over here.

# Project URL

https://www.drupal.org/project/context

# Where is the code?

You can find the current development version of the module at Github here https://github.com/oddhill/context
All development of the module will be done on Github, if you want to make any contributions please make pull requests over there.

All the development is currently in 8.x-1.x branch. beta
Stable (WIP)

# Estimated completion date

An alpha version has been released. Working on beta.

Stable release is in plan.

# Dependencies

There is currently no external dependencies with Context for Drupal 8. For D7: Chaos Tools 1.7 or higher.

# Who's doing the port?

Find https://www.drupal.org/node/2116959

# What help do they need?

  • Unit testing
  • Quality checking
  • Further development & management of the module

# D8 roadmap

Plan is to release beta version in May 2017. Leave it for 30 days and solve possible reported issues. After that create a first stable release.
Beta blokkers:
Can't use region-level reactions #2779619: Can't use region-level reactions
When saving an entity, I expect to see a status message and be redirected to the list/collection page #2877371: When saving an entity, I expect to see a status message and be redirected to the list/collection page.
Messages block displayed twice #2876747: Messages block displayed twice

Merge development to http://cgit.drupalcode.org/context/log/?h=8.x-4.x for Stable

# Background and reference information

This module is use by ERPAL for Service Providers at https://www.drupal.org/project/erpal

Comments

KarenS created an issue. See original summary.

KarenS’s picture

Issue summary: View changes
KarenS’s picture

Issue summary: View changes
KarenS’s picture

Priority: Critical » Normal
Francewhoa’s picture

Issue summary: View changes
Francewhoa’s picture

Status: Active » Needs work
NormySan’s picture

Assigned: Unassigned » NormySan
NormySan’s picture

Hey, I assigned this to myself hope that is ok.

Like @Francewhoa said I've started work on a Drupal 8 version of the module, repository can be found over at Github.

I've made some improvements to the code that are not yet available in the repo. I will most likely add them tomorrow.

NormySan’s picture

Issue summary: View changes
NormySan’s picture

Issue summary: View changes
enginpost’s picture

Can't figure out how to assign a reaction of type "active menu" based on "path". Is that not working yet?

NormySan’s picture

@enginpost There is no active menu reaction in the Drupal 8 module. I'm most likely not going to implement it for the 1.0 release either since i personally do not have a use for and can't see a reason for using it.

If anybody feels like they want to have the active menu reaction feel free to create a pull request over at Github with a plugin or create a contrib module! :)

rcodina’s picture

@NormySan For example, if I'm visiting a node of type News and I want News main menu item to be active, what I have to do in Drupal 8 (without 'active menu reaction')?

NormySan’s picture

@rcodina Hi, sorry but i do not know how the active menu trail works in Drupal 8. If you or anybody else have the time to look into it then please feel free to do and create a Reaction based on your findings. I simply do not have the spare time to do it myself right now, sorry.

rcodina’s picture

@NormySan No problem, If I have time I will try to find out how to do this

biggm’s picture

Hi, my company is committing our senior Drupal dev and me to help port this module to D8. Should we work from the issue queue within Github to assist?

rcodina’s picture

@biggm Could you try to port the active menu reaction? That would be cool. I don't have much time right now.

NormySan’s picture

@biggm Awesome, yes please use Github as the reference when developing :)

agentrickard’s picture

GitHub link changed -- https://github.com/oddhill/context

gstout’s picture

Hey guys I downloaded and tested out the github project and it seems to work well.

I love context but I've been avoiding it since starting to work with D8. I even built a site in D7 Site with Panels because I feared I'd need to use in in D8. Freakin Panels!!

If this works, as it seems it does, we should update the Drupal page and get it out in Alpha.

The world needs context!

NormySan’s picture

@gstout Hey, you're absolutely right. I've been pressed on time so I haven't really had time to do an alpha release. Hopefully i can get it done soon! :)

NormySan’s picture

Issue summary: View changes
Status: Needs work » Active
NormySan’s picture

Status: Active » Needs work
gstout’s picture

You're a good man NormySan. Thanks for putting the alpha out. I'll test and give you feedback.

PatrickMichael’s picture

Hi all, I have been playing with the alpha release and found the following:
I created a context on a path /contact condition and placing blocks as reaction. I was experimenting with creating a different layout for the contact page.
I found I was unable to place the Site Branding block and that the contextual links (such as edit) were missing on the page.
Perhaps I am missing something.
Thanks for the hard work.

heddn’s picture

Go ahead and open that as an issue back on the project page. This issue is just to track progress of the port to D8. Not to report problems.

ellioseven’s picture

I haven't seen any progress on the D8 port for context_layout so I thought I would make one.

Most of it has been completed, I just need to add in documentation and some unit testing. I didn't want to create a separate project but thought I would share my work here: https://github.com/ellioseven/context-layout.

Not really sure where to go from here to be honest, or how I could share my contribution with the project?

ellioseven’s picture

Having a further look, I can finish off the docs and testing, then apply a pull request into https://github.com/oddhill/context

ellioseven’s picture

I have submitted a pull request for the port of Context Layouts to D8. https://github.com/oddhill/context/pull/33

Benia’s picture

In Drupal 7 I used Context to hide regions as a reaction for certain conditions.

In Drupal 8 the only possible reaction I have is in block level (no region reaction possible).

IMHO, ontext was the only comfortable Drupal tool to hide regions in given certain conditions and It is quite sad that this capacity was taken away from the module; I humbly call to consider bringing it back.

mmjvb’s picture

Issue summary: View changes
Status: Needs work » Needs review

With 8.x-1.0-alpha1 Status should be `Needs review`

mmjvb’s picture

Issue summary: View changes

No real roadmap yet

boshtian’s picture

We are working on this, we only need a review on couple of issues, after they are put to RTBC we will create Beta release.

Currently active branch is 8.x-1.x, but through a discussion with maintainers we decided to do a stable release as 8.4. This is why we will also clean all the branches, since currently there are three under 8.x-.

Issues to be added in beta release, that need reviewing:

So as soon as this is reviewed and added to RTBC, we will create a new release.

boshtian’s picture

Issue summary: View changes
mmjvb’s picture

Issue summary: View changes

Added details roadmap to summary.