New Zenner
- Join Date:
- Mar 2006
- Posts:
- 9
- Plugin Contributions:
- 0
Add CSS Classes for Table Columns
I've modified /modules/product_listing.php to include CSS classes that identify the column order in the table. This allows you to address columns from your stylesheet to create interesting effects that would be impossible otherwise.
Here's what the HTML source looks like after the mod:
<table width="100%" border="0" cellspacing="0" cellpadding="0" class="tabTable">
<tr class="productListing-rowheading">
<th class="productListing-heading col1">Product Image</th>
<th class="productListing-heading col2">Item Name-</th>
<th class="productListing-heading col3">Price</th>
</tr>
<tr class="productListing-odd">
<td class="productListing-data col1" align="center"></td>
<td class="productListing-data col2"></td>
<td class="productListing-data col3" align="right"></td>
</tr>
</table>
Since the code changes are very minimal (two lines in this file), I thought it might be worthwhile to add to the next release. It would help reduce the need for template overrides, in my opinion. Of course, there are other modules/templates that could use this change.
I've attached a diff to this post.
What do you think?