Ok, this seems to work on my last point,
PHP Code:
<?php
/**
* Common Template - tpl_divular_display.php
*
* This file is used for generating divular output where needed, based on the supplied array of table-cell contents.
*
* @package templateSystem
* @copyright Copyright 2003-2006 Zen Cart Development Team
* @copyright Portions Copyright 2003 osCommerce
* @license http://www.zen-cart.com/license/2_0.txt GNU Public License V2.0
* @original version $Id: tpl_tabular_display.php 3957 2006-07-13 07:27:06Z drbyte $
* @modified by Loque 2006-12-13
*/
//print_r($list_box_contents);
$cell_scope = (!isset($cell_scope) || empty($cell_scope)) ? 'col' : $cell_scope;
$cell_title = (!isset($cell_title) || empty($cell_title)) ? 'list' : $cell_title;
?>
<div id="<?php echo 'cat' . $cPath . 'Table'; ?>" class="tabTable">
<?php
for($row=1; $row<sizeof($list_box_contents); $row++) { // modified to exclude the headings...
$r_params = "";
$c_params = "";
if (isset($list_box_contents[$row]['params'])) $r_params .= ' ' . $list_box_contents[$row]['params'];
?>
<div<?php echo $r_params; ?> <?php echo 'id="productList' . $row . '"' ?>>
<?php
for($col=0;$col<sizeof($list_box_contents[$row]);$col++) {
$c_params = "";
$cell_type = ($row==0) ? 'div' : 'div';
if (isset($list_box_contents[$row][$col]['params'])) $c_params .= ' ' . $list_box_contents[$row][$col]['params'];
if (isset($list_box_contents[$row][$col]['text'])) {
?>
<?php echo '<' . $cell_type . $c_params . '>'; ?><?php echo $list_box_contents[$row][$col]['text'] ?><?php echo '</' . $cell_type . '>' . "\n"; ?>
<?php
}
}
?>
</div>
<?php
}
?>
</div>
outputs to this;
HTML Code:
<div id="cat65Table" class="tabTable">
<div class="productListing-odd" id="productList1">
<div class="productListing-data"><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=182"><img src="images/blank.png" alt="CREST" title=" CREST " width="100" height="80" class="listingProductImage" /></a></div>
<div class="productListing-data">30</div>
<div class="productListing-data"><h3 class="itemTitle"><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=182">CREST</a></h3><div class="listingDescription">165G 100% COMBED COTTON JERSEY PRINT ON FRONT AND BACK</div></div>
<div class="productListing-data">£25.00<br /><br /><a href="http://yoursite.net//shop/index.php?main_page=index&cPath=65&sort=20a&action=buy_now&products_id=182"><img src="includes/templates/template_default/buttons/english/button_buy_now.gif" alt="Buy Now" title=" Buy Now " width="60" height="15" class="listingBuyNowButton" /></a><br /><br /></div>
</div>
<div class="productListing-even" id="productList2">
<div class="productListing-data"><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=183"><img src="images/blank.png" alt="RETRO LOGO" title=" RETRO LOGO " width="100" height="80" class="listingProductImage" /></a></div>
<div class="productListing-data">30</div>
<div class="productListing-data"><h3 class="itemTitle"><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=183">RETRO LOGO</a></h3><div class="listingDescription">165G 100% COMBED COTTON JERSEY PRINT ON FRONT AND BACK</div></div>
<div class="productListing-data">£25.00<br /><br /><a href="http://yoursite.net//shop/index.php?main_page=index&cPath=65&sort=20a&action=buy_now&products_id=183"><img src="includes/templates/template_default/buttons/english/button_buy_now.gif" alt="Buy Now" title=" Buy Now " width="60" height="15" class="listingBuyNowButton" /></a><br /><br /></div>
</div>
<div class="productListing-odd" id="productList3">
<div class="productListing-data"><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=181"><img src="images/blank.png" alt="ROOTS" title=" ROOTS " width="100" height="80" class="listingProductImage" /></a></div>
<div class="productListing-data">30</div>
<div class="productListing-data"><h3 class="itemTitle"><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=181">ROOTS</a></h3><div class="listingDescription">160G 100% COTTON JERSEY PRINT ON FRONT AND ARM</div></div>
<div class="productListing-data">£25.00<br /><br /><a href="http://yoursite.net//shop/index.php?main_page=index&cPath=65&sort=20a&action=buy_now&products_id=181"><img src="includes/templates/template_default/buttons/english/button_buy_now.gif" alt="Buy Now" title=" Buy Now " width="60" height="15" class="listingBuyNowButton" /></a><br /><br /></div>
</div>
<div class="productListing-even" id="productList4">
<div class="productListing-data"><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=180"><img src="images/blank.png" alt="SKATER 1989" title=" SKATER 1989 " width="100" height="80" class="listingProductImage" /></a></div>
<div class="productListing-data">30</div>
<div class="productListing-data"><h3 class="itemTitle"><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=180">SKATER 1989</a></h3><div class="listingDescription">160G 100% COTTON JERSEY PRINT ON FRONT AND BACK</div></div>
<div class="productListing-data">£25.00<br /><br /><a href="http://yoursite.net//shop/index.php?main_page=product_info&cPath=65&products_id=180">... more info</a><br /><br /></div>
</div>
</div>
I am probably doing something silly somewhere :¬)