PDA

View Full Version : Purpose of this Line


KartKorner
05-17-2006, 03:13 PM
Does anyone know what the purpose of the following line of code?!?

{foreach from=$categs item=cat name=categs}
{if ($smarty.foreach.categs.iteration mod $cats_per_col eq 1 and $cats_per_col gt 1) or $smarty.foreach.categs.first}<td>{/if}

and

{if ($smarty.foreach.categs.iteration mod $cats_per_col eq 0 and $cats_per_col gt 1) or $smarty.foreach.categs.last}</td>{/if}
{/foreach}

The reason I ask is because it is messing up my structure and was unsure it this was safe to remove or was part of preinstalled mod on 3.0.4? Thanks all.

Neticus
05-17-2006, 05:44 PM
They look like the codes that determine category columns structure, whether you've set it to two columns display, three columns display etc.

Admin>system>edit settings>directory>categories columns

KartKorner
05-17-2006, 08:00 PM
Thats what i thought too but when i changed it to 1 in the Admin area it had no effect on my pg layout.

anon
05-17-2006, 08:43 PM
Content visible to registered users only.
look at the code preceding the making of the columns.

it does a check to see if the first column will have more than 15 rows in it. if it does, it automatically adds 1 to the cats per row preset count, dividing it up into two.

:D

edit:
Content visible to registered users only.

if you want only 1 long column, encase the above code between {* code in here *}

KartKorner
05-17-2006, 09:16 PM
Duh. :rolleyes: Smacks Self :eek: Thanks for the fresh eyes :D