I have five exposed filter widgets that appear on this page. I would like to group three of them together and add a title above that group of three so that my layout goes from:
views default
- A
- B
- C
- D
- E
what I want
- A
TITLE
- B
- C
- D
E
Since this customization is specific to one page, I added a views-exposed-form--mypage.tpl.php
in my theme's template folder.
The code looks like this:
<div class="views-exposed-widgets clearfix">
<?php foreach ($widgets as $id => $widget): ?>
<div id="<?php print $widget->id; ?>-wrapper" class="views-exposed-widget views-widget-<?php print $id; ?>">
<?php if (!empty($widget->label)): ?>
<label for="<?php print $widget->id; ?>">
<?php print $widget->label; ?>
</label>
<?php endif; ?>
<?php if (!empty($widget->operator)): ?>
<div class="views-operator">
<?php print $widget->operator; ?>
</div>
<?php endif; ?>
<div class="views-widget">
<?php print $widget->widget; ?>
</div>
</div>
<?php endforeach; ?>
<?php if (!empty($sort_by)): ?>
<div class="views-exposed-widget views-widget-sort-by">
<?php print $sort_by; ?>
</div>
<div class="views-exposed-widget views-widget-sort-order">
<?php print $sort_order; ?>
</div>
<?php endif; ?>
Instead of the foreach loop, how can I print the individual widgets?