Skip to main content
Edit #99999, fix typo.
Source Link

Everything is possible in Drupal ;)

Probably Views does not automagically provide template suggestions for the exposed filter, like it does for the fields themselves. So you will need to do a little bit more work for this one:

  1. Use the the devel_themer module to find out what function/template is theming that exposed filter.
  2. Create a preprocessor for that theme function/template. In your preprocessor you can then insert dynamic template suggestions that will fire off based on any condition you want. You can create this preprocessor either in your custom theme's template.php file or in one of your custom modules. TheseThis D.O. article two D.O. articles guide will helpguide you on understanding template suggestions, and here is a D.A. question discussing how to buildwith creating the dynamic template suggestionssuggestion.

I will assume that you will be displaying different Views displays based on a URL path. If this were the case, then you can use Drupal's arg() function in your preprocessor to figure out what is the View display that you are currently displaying, and construct your template suggestion using that information. You can also inspect

Once you've setup your suggestions properly, then Drupal would automatically call the information that will be passed toappropriate template and voilá, you have different filter templates based on the preprocessor to see if there arepath (or any hints as to what View display is currently active. Ifother condition that you don't find nothing there then just revert to using arg()specify in your preprocessor).

Everything is possible in Drupal ;)

Probably Views does not automagically provide template suggestions for the exposed filter, like it does for the fields themselves. So you will need to do a little bit more work for this one:

  1. Use the the devel_themer module to find out what function/template is theming that exposed filter.
  2. Create a preprocessor for that theme function/template. In your preprocessor you can then insert dynamic template suggestions that will fire off based on any condition you want. You can create this preprocessor either in your custom theme's template.php file or in one of your custom modules. These two D.O. articles guide will help you on understanding template suggestions, and here is a D.A. question discussing how to build dynamic template suggestions.

I will assume that you will be displaying different Views displays based on a URL path. If this were the case, then you can use Drupal's arg() function in your preprocessor to figure out what is the View display that you are currently displaying, and construct your template suggestion using that information. You can also inspect the information that will be passed to the preprocessor to see if there are any hints as to what View display is currently active. If you don't find nothing there then just revert to using arg().

Everything is possible in Drupal ;)

Probably Views does not automagically provide template suggestions for the exposed filter, like it does for the fields themselves. So you will need to do a little bit more work for this one:

  1. Use the the devel_themer module to find out what function/template is theming that exposed filter.
  2. Create a preprocessor for that theme function/template. In your preprocessor you can then insert dynamic template suggestions that will fire off based on any condition you want. You can create this preprocessor either in your custom theme's template.php file or in one of your custom modules. This D.O. article will guide you with creating the dynamic template suggestion.

I will assume that you will be displaying different Views displays based on a URL path. If this were the case, then you can use Drupal's arg() function in your preprocessor to figure out what is the View display that you are currently displaying, and construct your template suggestion using that information.

Once you've setup your suggestions properly, then Drupal would automatically call the appropriate template and voilá, you have different filter templates based on the path (or any other condition that you specify in your preprocessor).

Source Link

Everything is possible in Drupal ;)

Probably Views does not automagically provide template suggestions for the exposed filter, like it does for the fields themselves. So you will need to do a little bit more work for this one:

  1. Use the the devel_themer module to find out what function/template is theming that exposed filter.
  2. Create a preprocessor for that theme function/template. In your preprocessor you can then insert dynamic template suggestions that will fire off based on any condition you want. You can create this preprocessor either in your custom theme's template.php file or in one of your custom modules. These two D.O. articles guide will help you on understanding template suggestions, and here is a D.A. question discussing how to build dynamic template suggestions.

I will assume that you will be displaying different Views displays based on a URL path. If this were the case, then you can use Drupal's arg() function in your preprocessor to figure out what is the View display that you are currently displaying, and construct your template suggestion using that information. You can also inspect the information that will be passed to the preprocessor to see if there are any hints as to what View display is currently active. If you don't find nothing there then just revert to using arg().