1

Views has a great feature where you can expose the exposed filters as a block (Exposed form in block under Exposed form).

So what's the "standard" way to theme these? Is there a Views template for this (I couldn't find one), or do I theme it with a renamed block.tpl.php?

3

Actually, although the exposed filter block does not have any template file in the list under Theming information, you can theme it with a views template file like this:

views-exposed-form--MYVIEWNAME.tpl.php

There is an example views-exposed-form.tpl.php in the Views module theme directory.

  • 2
    The same seems to be true for Drupal 8 (does not suggest theme hook), but instead of tpl.php you create a new twig template in the templates folder of your theme: views-exposed-form--MY-VIEW-NAME.html.twig – Jens Wegar Mar 19 '18 at 13:24
  • Just to say thanks and confirm that the way pointed by @JensWegar is working on D8.6. – Salvador P. Apr 25 at 13:26

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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