5

I'm sorry if it sounds like obvious question, but I cannot solve this... I'm using D7.15, customized Fusion subtheme and Display Suite to style the search result appearance. But all the times I get the search results page in fullscreen (no left or right sidebars) and I can't find the solution for this. No costomizations on search-results.tpl.php.

please help! :/

UPDATE: I'm using drupal core search, I have tried Search by page module too.

4
  • Enable some blocks on right side or left side region... Then you can able to see them...
    – Anil Sagar
    Commented Nov 8, 2012 at 12:12
  • What do you mean by "enable"? If you are talking about telling some particular block to appear on the left/right sidebar so of course I have tried it. Not working - looks like it forces to disable block regions (like an option in Display Suite), but the problem is that I cannot control it, or at least I don't know where to do that. Commented Nov 8, 2012 at 12:56
  • Do you by any chance have additional page--*.tpl.php files that might be matching for the search page? Are you certain the blocks that you want to display in these regions aren't empty on the search page? Commented Nov 8, 2012 at 14:02
  • No, I have non page--*tpl.php files, so there is nothing from that part that could override behaviour of columns. And the blocks - I am testing with normal working blocks, like "seach" block, for example. Commented Nov 9, 2012 at 12:39

3 Answers 3

2

Create one template file: page--search.tpl.php.

Write the following code:

//to print the main content
print render($page['content']);

//to print your right side-bar
print render($page['name_of_the_region_with_right_sidebar']);

and other customization as needed.

2

Hope this will help you,

As I understand, you need to show right and left sidebar in the search page. You can achieve it using context module.

Steps

  • After enabling the context module, add a new context using admin/structure/context/add

    enter image description here

  • Select PATH condition

    enter image description here

  • Add search PATH

    enter image description here

  • Now its time to add blocks, select Block Reactions

    enter image description here

  • Now add the your blocks in right and left sidebars.

    • Select blocks

      enter image description here

    • After adding the blocks

      enter image description here

  • Search result with blocks

    enter image description here

NOTE

  • Follow the same steps for search/user/*
0

This does not seem to be possible with the default core Search module or even apachesolr.

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.