It seems the Header and Footer HTML are being added BEFORE the results... and not with the results inside these two elements.

I have had a look around, but don't know where I should go.

Example:

Testimonials

With the help of a million photos, our grey matter will remember this tour for a long time. After many travels – home (“Aus”) is still best

Neville & Jean Newman

Thanks as always.
Jonny

Comments

fighella’s picture

Lets try that again:


<h2>Testimonials</h2>
  
<div class="view-header">

<!-- HEADER HTML -->
<table style="width: 300px;"  width="300">
<tr>
<td>

<!-- FOOTER HTML -->
</td></tr></table>    </div>


<!-- RESULTS -->  
<div class="view-content">
<p>With the help of a million photos, our grey matter will remember this tour for a long time.  After many travels – home (“Aus”) is still best</p>

<p>Neville &amp; Jean Newman</p>
    </div>
  
  
  
      
<div class="more-link">
  <a href="/testimonials">
    more  </a>


<!-- FOOTER HTML SHOULD GO HERE -->
</div>


merlinofchaos’s picture

Status: Active » Closed (won't fix)

The header and footer are being placed by views-view.tpl.php. For your reference, I'll duplicate the code here:

<?php
// $Id: views-view.tpl.php,v 1.9 2008/04/16 18:50:49 merlinofchaos Exp $
/**
 * @file views-view.tpl.php
 * Main view template
 *
 * Variables available:
 * - $header: The view header
 * - $footer: The view footer
 * - $rows: The results of the view query, if any
 * - $empty: The empty text to display if the view is empty
 * - $pager: The pager next/prev links to display, if any
 * - $exposed: Exposed widget form/info to display
 * - $feed_icon: Feed icon to display, if any
 * - $more: A link to view more, if any
 * - $admin_links: A rendered list of administrative links
 * - $admin_links_raw: A list of administrative links suitable for theme('links')
 *
 * @ingroup views_templates
 */
?>
<div class="view view-<?php print $css_name; ?> view-id-<?php print $name; ?> view-display-id-<?php print $display_id; ?>">
  <?php if ($admin_links): ?>
    <div class="views-admin-links views-hide">
      <?php print $admin_links; ?>
    </div>
  <?php endif; ?>
  <?php if ($header): ?>
    <div class="view-header">
      <?php print $header; ?>
    </div>
  <?php endif; ?>

  <?php if ($exposed): ?>
    <div class="view-filters">
      <?php print $exposed; ?>
    </div>
  <?php endif; ?>

  <?php if ($attachment_before): ?>
    <div class="attachment-before">
      <?php print $attachment_before; ?>
    </div>
  <?php endif; ?>

  <?php if ($rows): ?>
    <div class="view-content">
      <?php print $rows; ?>
    </div>
  <?php elseif ($empty): ?>
    <div class="view-empty">
      <?php print $empty; ?>
    </div>
  <?php endif; ?>

  <?php if ($pager): ?>
    <?php print $pager; ?>
  <?php endif; ?>

  <?php if ($attachment_after): ?>
    <div class="attachment-after">
      <?php print $attachment_after; ?>
    </div>
  <?php endif; ?>

  <?php if ($more): ?>
    <?php print $more; ?>
  <?php endif; ?>

  <?php if ($footer): ?>
    <div class="view-footer">
      <?php print $footer; ?>
    </div>
  <?php endif; ?>

  <?php if ($feed_icon): ?>
    <div class="feed-icon">
      <?php print $feed_icon; ?>
    </div>
  <?php endif; ?>

</div> <?php // class view ?>

You'll see that $hader and $footer are placed far away from each other.

In your code, I note that the footer does not appear to be surrounded by the view-footer markup, while the header is. This suggests to me that there is something incorrectly configured in your view.

fighella’s picture

Thanks merlin,

I looked into this. It seems the template is fine... but this means when I am putting the "footerHTML" content into the field... it is placing it in the " <?php print $header; ?> "

I have tried to reinstall the module... I will keep going.

merlinofchaos’s picture

Status: Closed (won't fix) » Active

I have never seen the footer end up in $header. Can you please paste an export of the view (and put it between php tags)?

fighella’s picture

hi merlin,

I have no idea how it happened. but it definately happened..

anyhow since I re-installed the views module, it kept same values all in the "$header" but I went back in and resaved the headerthml and footerhtml and it seemed to do the trick...

I have no idea how it ended up like that... if it happens again I will re-open.

But it seemed after re-installing it, it went away. It could have just been a coincidence... but I definately did see an issue.

I think I can close this. Not sure if it was a bug or just me?! (probably just me)

Thanks for the help as always.

merlinofchaos’s picture

Status: Active » Fixed

Very strange. Marking fixed since you have it working.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.