Hi. :-) I'm relatively new to PHP/CSS although I'm figuring it out by trial and error. Uh, mostly error...

The problem is that there is a big gap between my CATEGORIES and SUBCATEGORIES on the front page of my directory. I'm guessing the culprit is this line:

<p class="subcats">

which starts a new paragraph. This is the code on the main.tpl page:

{* Categories *}
{if !empty($categs)}
   {if !empty($category.ID)}

   <table border="0" cellpadding="0" cellspacing="2">
      {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}
      <h2><a href="{$smarty.const.DOC_ROOT}/{$cat.CACHE_URL|escape}" 


$smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>

      {* Display subcategories *}
      {if !empty($cat.SUBCATS)} 
      <p class="subcats">
         {foreach from=$cat.SUBCATS item=scat name=scategs}
            <a href="{$smarty.const.DOC_ROOT}/

            {$scat.TITLE|escape}</a>, {/foreach}..
      {if ($smarty.foreach.categs.iteration mod $cats_per_col eq 0 

and $cats_per_col gt 1) or $smarty.foreach.categs.last}</td>{/if}

Does anyone know how to change this?

Wow, what's with all the {}'s and the .tpl file? is there something about PHP that I'm missing? I haven't come across anything that looks like that before.

This article has been dead for over six months. Start a new discussion instead.