2

I am currently building a D7 theme for a website. I experiment some problems with the search page. After entering a search term the page "domain.com/search/node/[searched term]" is opened. But it just show the base page with nothing in the main-content block.

With another theme it works : results are shown properly on the search page and I can see both node tab and user tab. I assume something is wrong in my theme. I try to override "search-results.tpl.php" because I read that this template is used to build the search page, but in my case it seems that the template is not used because if I put this code on it :

<?php print "foo"; ?>

there is no changes on the search page.

Any ideas ?

2
  • Obvious first questions: Did you place the tpl file in the correct folder? Did you clear the theme cache? Commented Jun 20, 2011 at 13:40
  • Yes I already check that.
    – a.b.d
    Commented Jun 20, 2011 at 13:42

1 Answer 1

1

I finally solve the problem. The problem was my implementation of the template page "page.tpl.php" because inside this I never call :

<?php print render($page['content']); ?>

As a consequence the results of the search were never shown, so I can't saw changes made in "search-results.tpl.php" ...

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.