Lets say I have a website called "website123" along with several pages called "pageA", "pageB", "pageC" and "news". Each of these pages has custom blocks that will only display on these pages. (Think bannerA/bannerB/bannerC and sidemenuA/sidemenuB/sidemenuC)

On the news page you have a view that will grab all published content that are articles. On "pageA" it will grab all content tagged with "a", "pageB" and "pageC" will have a view just like "pageA" except it will go for content tagged with "b" and "c".

I'll create an article called and tag it with "a,c" so this will go to "news", "pageA" and "pageC".

If you go to "pageA" the layout will be banner at the top and sidemenu on the left with the view in the middle with a list of articles tagged with "a" in a teaser viewmode

Is it possible to make it so that when you click "read more" it will open the article in the current region / page so that the same custom banner/sidemenu applied on "pageA" will be applied to all articles in "viewA"?

Then since the article was tagged with "c" as well if you went to "pageC" and in "viewC" if you clicked the same article there it would open with the banner and sidemenu that only "pageC" has.

Sorry if this question is really confusing, but any advise would be appreciated.

2 Answers 2


This is a response to the part: Is it possible to make it so that when you click....

If the page regions don't change and all you are really checking for is the blocks that should show depending on the referer, you could do something in your blocks where they check $_SERVER['HTTP_REFERER'].

You could breakdown the HTTP_REFERER so you could get /sectionA/article or /sectionB/article or /sectionC/article.

Then you would have your sectionA/B/C that you could then pass into your blocks.

You might use something like this below in your block and selecting the PHP evaluation method.

If user comes from sectionA/article your block might look like the below and it would show up.

if (isset($_SERVER['HTTP_REFERER']) {
  $referer = $_SERVER['HTTP_REFERER'];
  switch ($referer) {
    case 'pageA':
      return TRUE;

    case 'pageB':
      return FALSE;

    case 'pageC':
      return FALSE;

  • Another question: Is it possible for if you click on an article in a view, the article would then expand to default view within the content region of that node? Then all other blocks would remain in the same layout? I have about 6-7 blocks around the content region that go with any of the article this view.
    – kaymoris
    Commented Jan 19, 2015 at 22:52

I think what you are looking Views Related Content

Views Related Content is an extension to the Views module. It helps show the related contents, related nodes on the content detail page. This module makes it easy for you to work with contents, nodes by adding the filter criteria by Author, Content Type, Taxonomy Terms in the Views configuration.

Your Answer

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

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