daxcastro Posted October 10, 2012 Share Posted October 10, 2012 HELP!! Trying to finish a client's site. What are these and how can I get rid of them. I looked at the html and the php and cant figure it out. I cant tell where the extra spaces are coming in from. When I look at the html is shows: <a href="http://store.funsockcity.com/index.php?id_category=7&controller=category" title="Baby Socks"> <img src="/img/c/en-default-medium.jpg" alt="" width="58" height="58"> </a> when I look at the tpl file is shows: <h3>{l s='Subcategories'}</h3> <ul class="inline_list"> {foreach from=$subcategories item=subcategory} <li> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /> {/if} </a><br /> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> {/foreach} </ul> Link to comment Share on other sites More sharing options...
daxcastro Posted October 10, 2012 Author Share Posted October 10, 2012 For those wanting the fix.... here is is. I figured it out. See below.. The ending href tag and the line break tag need to be right after each url and not after the closing if tag. Compare and you can see what I mean. Hope this helps someone else too. <li> <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}" title="{$subcategory.name|escape:'htmlall':'UTF-8'}"> {if $subcategory.id_image} <img src="{$link->getCatImageLink($subcategory.link_rewrite, $subcategory.id_image, 'medium')}" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" /></a><br /> {else} <img src="{$img_cat_dir}default-medium.jpg" alt="" width="{$mediumSize.width}" height="{$mediumSize.height}" />[color=#ff0000]</a><br />[/color] {/if} <a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'htmlall':'UTF-8'}">{$subcategory.name|escape:'htmlall':'UTF-8'}</a> </li> Link to comment Share on other sites More sharing options...
Recommended Posts