1

I'm trying to stick a flexbox in a view's Header Global: Text area and there's a wrapping paragraph tag that I'm trying to theme away. The views-view.tpl.php only has 'print $header' inside the 'view-header' div so the errant 'p' must be rendered into the $header variable.

I can trim the paragraph tags from the $header variable in template.php with a post render hook, but I'd rather modify a tpl file.

2

It seems the <p> tag is inserted on the Global: Text Area header, but not on the Global: Unfiltered text. In case it is acceptable for you to use this one, it might fix your issue.

(by the way, in version 8 of Views, the <p> tag is not inserted any more for the Global: Text Area header)

0

In settings.php add

$conf['theme_debug'] = TRUE;

View the source of the page and you will see the theme files being rendered and possible alternatives.

  • Neat trick, but it didn't help in this case. The comments just say that views-view.tpl.php is the template powering the header bit. – ponies Jan 30 '17 at 20:09
  • Yes I think that's it. The last time I did this I overwrote the page.tpl.php and custom loaded the lot. I was trying to combine a bunch of views and blocks though so overkill. You could try making the header text format 'php' and just printing the header that you want. – Interlated Jan 30 '17 at 20:23

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.