Jump to content

Plz help me split Subcategories Data into 2 columns


hellomyfriends

Recommended Posts

The code below:

		{php $CATEGORY = cache_read('category-'.$mid.'.php');}
	<table width="100%" cellspacing="0" cellspacing="0">
	{php $child = get_maincat(0, $CATEGORY, 1);}
	{loop $child $i $c}
	{if $i%2==0}<tr{if $i%4==2} bgcolor="#FAFCFE"{/if}>{/if}
	<td valign="top" width="50%" onmouseover="this.style.backgroundColor='#E2F0FB';" onmouseout="this.style.backgroundColor='';">
	<p>
		<a href="{$MODULE[$mid][linkurl]}{$c[linkurl]}" class="px15"><strong>{set_style($c[catname], $c[style])}</strong></a>
		{if $c[child]}
		{php $sub = get_maincat($c[catid], $CATEGORY, 2);}
		{loop $sub $j $s}{if $j < 5} <a href="{$MODULE[$mid][linkurl]}{$s[linkurl]}"><strong>{set_style($s[catname], $s[style])}</strong></a>{/if}{/loop}
		{/if}
	</p>
	{if $c[child]}
	{php $sub = get_maincat($c[catid], $CATEGORY, 1);}
		<ul>
		{loop $sub $j $s}
		<li><a href="{$MODULE[$mid][linkurl]}{$s[linkurl]}" class="g">{set_style($s[catname], $s[style])}</a></li>
		{/loop}
		{if $j>10}<li><a href="{$MODULE[$mid][linkurl]}{$c[linkurl]}" class="g">All</a></li>{/if}
		</ul>
		<div class="c_b"></div>
	{/if}
	</td>
	{if $i%2==1}</tr>{/if}
	{/loop}
	</table>

The images attached.

 

Plz help me split Subcategories Data into 2 columns

 

Sub 1 | Sub 4

Sub 2 | Sub 5

Sub 3 |

 

Thanks a lot.

Terry Tran

 

 

 

 

 

 

[attachment deleted by admin]

Users should not "bump" topics that are still on the first page of the forums. If you bump' date=' you must provide additional information[/color']. If you resort to bumping, chances are your question needs to be re-thought and re-described (see Eric Raymond's "How To Ask Questions The Smart Way").

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.