Next Boston Meetup - A Challenge

Events happening in the community are now at Drupal community events on www.drupal.org.
nancydru's picture

Here's a challenge for you for our next Boston (Cambridge) meet up:

My site's pages are basically three parts: Header, right sidebar (lots of custom blocks), and display area. The header and sidebar are sensitive to how how one got there (context). However, occasionally, such as a "see all" link from a block, throws the sidebar and header off because the context is lost. Additionally, when going from a taxonomy/term/xxx or blog/xxx to an individual post, the user want to maintain the previous context.

How would you effectively freeze the header and sidebar when going to those areas which lose the context, or for which we choose not to change the focus?

I can't demo this because I'm mostly stumped on it. I have considered caching the freezable areas and using hook_init to unfreeze them when it's time to change, but I run into timing problems, not to mention performance issues.

Comments

Long URLs or Session Variables

bensheldon's picture

How are you maintaining context? Just by URL path? In that case, I would recommend creating a "mirror" of the content with a URL appended to the previous URL.

For example, going from taxonomy/term/xxx to a blog/333 would instead go to:

taxonomy/term/xxx/blog/333

You would probably have to recreate/override quite a lot of built-in links. (you could do this with views)

The second thing I would suggest is save the state in a session variable and display the blocks based on that variable. The difficulty would be mapping out where/how you would want that variable set.

At least that's my $0.02. There could be a module that does exactly what you want :-) Good luck.

I'm not sure if your talking

hefox's picture

I'm not sure if your talking about context module itself, but to expand on what bensheldon said, with an example of how spaces does it.

Spaces uses purl, which uses the url rewrite (see the url alter module, purl for examples of url inbound/outbound overwritting) to keep track of context. You could use this; possibly could uses spaces, or such, though that's overhead.

(Spaces provides a filter to to views to limit items to those from current space only).

Boston

Group categories

More Specifically

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: