I need help!! Here is the problem. My directory is here: http://www.trafficbunnies.com/directory I basically want to keep it looking basically the same, except that I want to make the category name a little larger, and add an image next to each category name. I tried, but you can see what happened when I gave it a go. I took a picture of it, and then reverted it back to the normal look. I have included the code that I thought should work, but clearly isn't. Can someone fix the code for me, or at least tell me where I have gone wrong? Am going slightly mad.... Cindy {* Calculate title from path *} {capture name="title"} {if count($path) > 1} - {/if} {foreach from=$path item=category name=path} {if $smarty.foreach.path.iteration gt 2} > {/if} {if not $smarty.foreach.path.first} {$category.TITLE} {/if} {/foreach} {/capture} {strip} {if $title_prefix} {assign var="in_page_title" value=$title_prefix|cat:$category.TITLE} {else} {assign var="in_page_title" value=$category.TITLE} {/if} {assign var="description" value=$category.DESCRIPTION} {include file="header.tpl"} {include file="top_bar.tpl"} {* Calculate the number of categories per row *} {php} $this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / CATS_PER_ROW)); {/php} {if $cats_per_col > 100} {php} $this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / (CATS_PER_ROW + 1))); {/php} {/if} {* Show category search results *} {if $search_category} {$search_category} {/if} {if isset($have_search_results) and $have_search_results == 0} <div> <p>{l}Sorry, no records found that match your keyword(s){/l}: "{$search|escape|wordwrap:200:"\n":true}"</p> <p>{l}Suggestions{/l}:</p> <p> <ul> <li>{l}Make sure all words are spelled correctly{/l}.</li> <li>{l}Try different keywords{/l}.</li> <li>{l}Try more general keywords{/l}.</li> </ul> </p> </div> {/if} {* Categories *} {if !empty($categs)} {if !empty($category.ID)} <h3>{l}Categories{/l}</h3> {/if} <table border="0" align="center" cellpadding="0" cellspacing="25"> <link rel="shortcut icon" href="favicon.ico"/> <tr> {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 valign="top">{/if} <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Arts'} <img src="http://www.trafficbunnies.com/directory/icons/art.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Business'} <img src="http://www.trafficbunnies.com/directory/icons/business.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Computers'} <img src="http://www.trafficbunnies.com/directory/icons/computers.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Games'} <img src="http://www.trafficbunnies.com/directory/icons/games.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Health'} <img src="http://www.trafficbunnies.com/directory/icons/health.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Home'} <img src="http://www.trafficbunnies.com/directory/icons/home.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Internet'} <img src="http://www.trafficbunnies.com/directory/icons/internet.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Kids & Teens'} <img src="http://www.trafficbunnies.com/directory/icons/kids.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Marketing'} <img src="http://www.trafficbunnies.com/directory/icons/marketing.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'News'} <img src="http://www.trafficbunnies.com/directory/icons/news.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Recreation'} <img src="http://www.trafficbunnies.com/directory/icons/recreation.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Reference'} <img src="http://www.trafficbunnies.com/directory/icons/reference.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Regional'} <img src="http://www.trafficbunnies.com/directory/icons/regional.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Science'} <img src="http://www.trafficbunnies.com/directory/icons/science.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Shopping'} <img src="http://www.trafficbunnies.com/directory/icons/shopping.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Society'} <img src="http://www.trafficbunnies.com/directory/icons/society.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Sports'} <img src="http://www.trafficbunnies.com/directory/icons/sports.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> {* Display subcategories *} {if !empty($cat.SUBCATS)} <p class="subcats"> {foreach from=$cat.SUBCATS item=scat name=scategs} <img src="{$smarty.const.FULL_TEMPLATE_PATH}/images/icon1.gif" class="icon1"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{$scat.TITLE_URL|escape}/{else}index.php?c={$scat.ID}{/if}"> {$scat.TITLE|escape}</a><br />{/foreach} </p> {/if} {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} </tr> </table> {/if} {if $smarty.const.FTR_ENABLE == 1 and !empty($feat_links)} <h3>{l}Featured Links{/l}</h3> <div class="featured">{foreach from=$feat_links item=link name=links} {include file="link.tpl" link=$link} {/foreach}</div> {/if} {* Links heading and sorting*} {if ($uid or $search or !empty($category.ID) or $list) and !empty($links)} <h3>{l}Links{/l} {if not $list}<span class="small" style="margin-left:50px;">{l}Sort by{/l}: {if $smarty.const.ENABLE_PAGERANK and $smarty.const.SHOW_PAGERANK}{if $sort eq 'P'}<span class="sort"> {l}PageRank{/l}</span>{else}<a href="?s=P{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}"> {l}PageRank{/l}</a>{/if} |{/if} {if $sort eq 'H'} <span class="sort">{l}Hits{/l}</span>{else} <a href="?s=H{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Hits{/l}</a>{/if} {if $sort eq 'A'} | <span class="sort">{l}Alphabetical{/l}</span>{else} | <a href="?s=A{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Alphabetical{/l}</a>{/if} </span>{/if}</h3> <div class="standard"> {foreach from=$links item=link name=links} {include file="link.tpl" link=$link} {/foreach} </div> {/if} {* Javascript for tracking link clicks *} {if $StopLinkHits eq 0} <script type="text/javascript"> /* <![CDATA[ */ var root = '{$smarty.const.DOC_ROOT}'; {literal} var a = document.getElementsByTagName("a"); for(i = 0; i< a.length; i++) if(a[i].id != '') a[i].onclick = count_link; function count_link() { i = new Image(); i.src= root+'/cl.php?id='+this.id; return true; } {/literal} /* ]]> */ </script> {/if} {include file="footer.tpl"} {/strip} Code (markup):
Try changing this: <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Arts'} <img src="http://www.trafficbunnies.com/directory/icons/art.jpg" {/if}class="icon"> Code (markup): to this (notice the "{/if}" is at the end of the img tag) <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Arts'} <img src="http://www.trafficbunnies.com/directory/icons/art.jpg" class="icon">{/if} Code (markup): That's the first thing I noticed, maybe there's something else... HTH, cheers!
Thankyou, I fixed that bit - but it didn't really solve the problem. Duplicates of the categories are still showing up. Any other suggestions?
Uhm... ok, now try moving the '{/if}' you changed to the end of each row From this (the original code you had): <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Arts'} <img src="http://www.trafficbunnies.com/directory/icons/art.jpg" {/if}class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}</h3> Code (markup): to this: <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Arts'} <img src="http://www.trafficbunnies.com/directory/icons/art.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> Code (markup):
Thanks We are getting closer!! Still not quite right though. The category names are not repeating, but there are lines there. I have included the new code and a picture of what it looks like now I totally appreciate your help! {* Calculate title from path *} {capture name="title"} {if count($path) > 1} - {/if} {foreach from=$path item=category name=path} {if $smarty.foreach.path.iteration gt 2} > {/if} {if not $smarty.foreach.path.first} {$category.TITLE} {/if} {/foreach} {/capture} {strip} {if $title_prefix} {assign var="in_page_title" value=$title_prefix|cat:$category.TITLE} {else} {assign var="in_page_title" value=$category.TITLE} {/if} {assign var="description" value=$category.DESCRIPTION} {include file="header.tpl"} {include file="top_bar.tpl"} {* Calculate the number of categories per row *} {php} $this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / CATS_PER_ROW)); {/php} {if $cats_per_col > 100} {php} $this->assign('cats_per_col', ceil(count($this->get_template_vars('categs')) / (CATS_PER_ROW + 1))); {/php} {/if} {* Show category search results *} {if $search_category} {$search_category} {/if} {if isset($have_search_results) and $have_search_results == 0} <div> <p>{l}Sorry, no records found that match your keyword(s){/l}: "{$search|escape|wordwrap:200:"\n":true}"</p> <p>{l}Suggestions{/l}:</p> <p> <ul> <li>{l}Make sure all words are spelled correctly{/l}.</li> <li>{l}Try different keywords{/l}.</li> <li>{l}Try more general keywords{/l}.</li> </ul> </p> </div> {/if} {* Categories *} {if !empty($categs)} {if !empty($category.ID)} <h3>{l}Categories{/l}</h3> {/if} <table border="0" align="center" cellpadding="0" cellspacing="25"> <link rel="shortcut icon" href="favicon.ico"/> <tr> {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 valign="top">{/if} <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Arts'} <img src="http://www.trafficbunnies.com/directory/icons/art.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Business'} <img src="http://www.trafficbunnies.com/directory/icons/business.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Computers'} <img src="http://www.trafficbunnies.com/directory/icons/computers.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Games'} <img src="http://www.trafficbunnies.com/directory/icons/games.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Health'} <img src="http://www.trafficbunnies.com/directory/icons/health.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Home'} <img src="http://www.trafficbunnies.com/directory/icons/home.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Internet'} <img src="http://www.trafficbunnies.com/directory/icons/internet.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Kids & Teens'} <img src="http://www.trafficbunnies.com/directory/icons/kids.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Marketing'} <img src="http://www.trafficbunnies.com/directory/icons/marketing.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'News'} <img src="http://www.trafficbunnies.com/directory/icons/news.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Recreation'} <img src="http://www.trafficbunnies.com/directory/icons/recreation.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Reference'} <img src="http://www.trafficbunnies.com/directory/icons/reference.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Regional'} <img src="http://www.trafficbunnies.com/directory/icons/regional.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Science'} <img src="http://www.trafficbunnies.com/directory/icons/science.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Shopping'} <img src="http://www.trafficbunnies.com/directory/icons/shopping.jpg"class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Society'} <img src="http://www.trafficbunnies.com/directory/icons/society.jpg" class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> <h3>{if $category.ID eq 0 and $cat.TITLE eq 'Sports'} <img src="http://www.trafficbunnies.com/directory/icons/sports.jpg"class="icon"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{else}index.php?c={$cat.ID}{/if}">{$cat.TITLE|escape}</a>{if $smarty.const.CATS_COUNT} <span class="count">({$cat.COUNT})</span>{/if}{/if}</h3> {* Display subcategories *} {if !empty($cat.SUBCATS)} <p class="subcats"> {foreach from=$cat.SUBCATS item=scat name=scategs} <img src="{$smarty.const.FULL_TEMPLATE_PATH}/images/icon1.gif" class="icon1"><a href="{if $smarty.const.ENABLE_REWRITE}{$cat.TITLE_URL|escape}/{$scat.TITLE_URL|escape}/{else}index.php?c={$scat.ID}{/if}"> {$scat.TITLE|escape}</a><br />{/foreach} </p> {/if} {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} </tr> </table> {/if} {if $smarty.const.FTR_ENABLE == 1 and !empty($feat_links)} <h3>{l}Featured Links{/l}</h3> <div class="featured">{foreach from=$feat_links item=link name=links} {include file="link.tpl" link=$link} {/foreach}</div> {/if} {* Links heading and sorting*} {if ($uid or $search or !empty($category.ID) or $list) and !empty($links)} <h3>{l}Links{/l} {if not $list}<span class="small" style="margin-left:50px;">{l}Sort by{/l}: {if $smarty.const.ENABLE_PAGERANK and $smarty.const.SHOW_PAGERANK}{if $sort eq 'P'}<span class="sort"> {l}PageRank{/l}</span>{else}<a href="?s=P{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}"> {l}PageRank{/l}</a>{/if} |{/if} {if $sort eq 'H'} <span class="sort">{l}Hits{/l}</span>{else} <a href="?s=H{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Hits{/l}</a>{/if} {if $sort eq 'A'} | <span class="sort">{l}Alphabetical{/l}</span>{else} | <a href="?s=A{if not $smarty.const.ENABLE_REWRITE}&c={$category.ID}{/if}{if $search}&search={$search}{/if}{if $uid}&uid={$uid}{/if}{if !empty($p)}&p={$p}{/if}">{l}Alphabetical{/l}</a>{/if} </span>{/if}</h3> <div class="standard"> {foreach from=$links item=link name=links} {include file="link.tpl" link=$link} {/foreach} </div> {/if} {* Javascript for tracking link clicks *} {if $StopLinkHits eq 0} <script type="text/javascript"> /* <![CDATA[ */ var root = '{$smarty.const.DOC_ROOT}'; {literal} var a = document.getElementsByTagName("a"); for(i = 0; i< a.length; i++) if(a[i].id != '') a[i].onclick = count_link; function count_link() { i = new Image(); i.src= root+'/cl.php?id='+this.id; return true; } {/literal} /* ]]> */ </script> {/if} {include file="footer.tpl"} {/strip} Code (markup):
Oh, my goodness!!! I did it!!! I had the <h3> in there instead of <h2> .... Thanks heaps again for your help! Some green is sure to be coming your way