1

I am using Context with Delta and Omega3. I am trying to make the Drupal Commerce Checkout, Review and Complete pages each appear differently. These are their default paths:

checkout/*
checkout/*/review
checkout/*/complete

The problem is that if you set a condition path to 'checkout/*' in one context then the 'review' and 'complete' condition paths will both be overridden by it.

Is there a way to get separate contexts for each of the 3 pages?

2
  • Drupal's recognition is greedy. Sometimes it's good to define shortest path last. I don't know enough about stuff you are using, not enough to post full answer, but hope that'll help.
    – Mołot
    May 22, 2013 at 15:06
  • I need to define 3 different contexts for each of the different paths. Since each condition path is in a different context and there is no way of weighting contexts, I don't think the order of path definition would make any difference.
    – user320691
    May 22, 2013 at 15:21

1 Answer 1

4

Create 3 different contexts, in each context add path condition and set the paths as follow:

First Context:

checkout/*
~checkout/*/review
~checkout/*/complete

Second Context:

~checkout/*
checkout/*/review
~checkout/*/complete

Third Context:

~checkout/*
~checkout/*/review
checkout/*/complete

According to Context documentation ~ character (tilde) can be used to exclude one or more paths.

2
  • 1
    That worked. Despite the module's popularity, I was not able to find much in the way of documentation for Context. The drupal.org page points to README.txt. Anyway, I was getting ready to write a plugin so thank you!
    – user320691
    May 22, 2013 at 16:59
  • 1
    @kalidasan glad my answer helped you :)
    – Aboodred1
    May 19, 2016 at 2:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.