View Single Post
  #2  
Old 11-16-2009, 03:23 AM
  Zaja's Avatar 
Zaja Zaja is offline
 

X-Adept
  
Join Date: Mar 2004
Location: The Universe is my home
Posts: 420
 

Default Re: Show manufacturers in columns

1. Open /skin1/modules/Manufacturers/customer_manufacturers_list.php

2. Replace:
Code:
<ul class="manufacturers-list list-item"> {foreach from=$manufacturers item=v} <li><a href="manufacturers.php?manufacturerid={$v.manufacturerid}">{$v.manufacturer|escape}</a></li> {/foreach} </ul>

with:
Code:
<ul class="manufacturers-list list-item"> {assign var="col" value="0"} {foreach from=$manufacturers item=v} {if $col == 4}{* Adjust the number of columns *} </ul><ul class="manufacturers-list list-item">{assign var="col" value="0"} {/if} <li><a href="manufacturers.php?manufacturerid={$v.manufacturerid}">{$v.manufacturer|escape}</a></li> {assign var="col" value="`$col+1`"} {/foreach} </ul>

3. Add/replace this code in main.css:
Code:
/* manufacturers list */ ul.manufacturers-list { padding: 0; margin: 0 0 8px 0; list-style: none; clear: both; } ul.manufacturers-list li { margin: 0; padding: 2px; white-space: nowrap; display: inline; float: left; width:100px; }


Optional postinstallation steps:
- adjust the number of columns: {if $col ==
4}
__________________
_/ _/ _/ _/ _/ _/ _/ _/ _/

7dana.com
Reply With Quote