I've created a grid view which I'm trying to theme. I'd like to remove the <tbody> tags from the table, but even though I've deleted them from the views-view-grid--archive.tpl.php file, they still appear in the page's HTML code...
To further test this, I added <p> tags between the <table> and <td> tags, but on the page, the paragraph appeared before the table, not within it! (see below code) I realise this isn't valid code, but I've never known a browser to change the HTML just because it's invalid...

Here's an example of what was happening...
PHP file:

<h3>2007</h3>
<table class="views-view-grid">
  <p>test paragraph</p>
  <tr>
    <td>lalala</td>
  </tr>
</table>

Firebug:

<h3>2007</h3>
<p>test paragraph</p>
<table class="views-view-grid">
  <tbody>
    <tr>
      <td>lalala</td>
    </tr>
  </tbody>
</table>

Why am I getting these results and how can I remove the <tbody> tags from my table view?

Comments

merlinofchaos’s picture

Status: Active » Postponed (maintainer needs more info)

If you're using firebug to examine the HTML, rather than simply doing a view source, what you're actually looking at is the DOM, not the HTML. The DOM actually is coerced to being valid. And I believe firefox believes a table must have a tbody to be valid.

Try doing a simple view source?

BWPanda’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

Thanks, I didn't realise that about Firebug - it's a bit deceiving...
All's well then!