开发者

Drupal: How to assign a specific view template to search results?

Is there a way to assign a specific view to search results in drupal ?

I'm currently using custom_search module.

When a customer search for products, I would like to display the search results with the same template of the catalog (the taxonomy view).

I've also tried to use "Search terms" filter, which works.. but it disappear wh开发者_运维百科en I'm visiting other pages, because it is part of the view.

thanks


The best way in general to learn about theming is to grab the Devel and Devel Themer contrib modules and enable them. This will add a little widget to your pages that will let you inspect what template files are being used to render each page. So you could then go to your search results page, get the name of the template file you need to create and then basically copy across the code from the template that you want to mimic.

However, if you're happy with using views the answer to your other question can be used to put the search form on any page.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜