| ||||||||||
Shopping cart software Solutions for online shops and malls | ||||||||||
|
X-Cart Home | FAQ | Forum rules | Calendar | User manuals | Login |
Unwanted Space in Main/SubCategories.tpl | ||||
|
|
Thread Tools | Search this Thread |
#1
|
|||||||||
|
|||||||||
Unwanted Space in Main/SubCategories.tpl
I have looked everywhere for what I think will be a simple answer to this...
What I'm trying to accomplish is to vertically align the TOPS of the LEFT column Category header graphic with the MAIN column Product Title text. This problem is also in the X-Cart Demo site so I know it's NOT something I failed to or not to do. This problem is more noticeable in Mozilla than IE but I'd like a consistent looking website on both browsers. I believe the problem is within the main/subcategories.tpl as other template pages do NOT have the unwanted space. It seems to be something before any code is entered (seems like a hidden field, text, command, etc.). The first graphic shows what I'm talking about when using the subcategories.tpl to display the page... the 2nd graphic shows NO unwanted space within the template. I used the debugging console to help see the unwanted space I'm talking about. http://www.macaspen.com/unwanted_space.gif
__________________
Aspen Best Buy Network X-Cart 4.0.19 Unix |
|||||||||
#2
|
|||||||
|
|||||||
Re: Unwanted Space in Main/SubCategories.tpl
Post your subcategories template and the html code you are using for the header graphic.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#3
|
|||||||||
|
|||||||||
Re: Unwanted Space in Main/SubCategories.tpl
Padraic...
Did you mean to post all of the code like this or to link it? customer/main/subcategories.tpl... {* $Id: subcategories.tpl,v 1.43.2.9 2006/06/27 08:22:01 svowl Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} <P> {include file="modules/Bestsellers/bestsellers.tpl"} {/if} <P> {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/category_offers_short_list.tpl"} {/if} {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}<P>{/if} {capture name=dialog} {assign var="tmp" value="0"} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {if $subcategories} <TABLE border="0" cellspacing="5" width="100%"> {foreach from=$subcategories item=subcat} <TR> {if $tmp and $first_subcat ne "Y"} <TD valign="top" rowspan="{count value=$subcategories print="Y"}"><IMG src="{if $current_category.icon_url}{$current_category.icon _url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}"></TD> {assign var="first_subcat" value="Y"} {/if} <TD align="left" width="95%"> <A href="home.php?cat={ $subcat.categoryid }"><FONT class="ItemsList">{ $subcat.category|escape }</FONT></A><BR></TD> <TD align="right" nowrap><FONT class="Text">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if} {/if}</FONT></TD> </TR> {/foreach} </TABLE> {/if} {if $tmp and $products ne "" } <BR clear="left"> <HR size="1" noshade> {/if} {if $products} {if $sort_fields} <DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</DIV> {/if} {if $total_pages gt 2} <BR> { include file="customer/main/navigation.tpl" } {/if} <HR size="1" width="100%"> {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} <P> {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" } Here's the only other related template that I think could possibly be causing problem... dialog.tpl... {* $Id: subcategories.tpl,v 1.43.2.9 2006/06/27 08:22:01 svowl Exp $ *} {if $active_modules.Bestsellers ne "" and $config.Modules.bestsellers_menu ne "Y"} <P> {include file="modules/Bestsellers/bestsellers.tpl"} {/if} <P> {if $active_modules.Special_Offers} {include file="modules/Special_Offers/customer/category_offers_short_list.tpl"} {/if} {if ($navigation_page eq "")||($navigation_page eq "1")}{$current_category.description}<P>{/if} {capture name=dialog} {assign var="tmp" value="0"} {section name=cat_num loop=$subcategories} {if $subcategories[cat_num].category}{assign var="tmp" value="1"}{/if} {/section} {if $subcategories} <TABLE border="0" cellspacing="5" width="100%"> {foreach from=$subcategories item=subcat} <TR> {if $tmp and $first_subcat ne "Y"} <TD valign="top" rowspan="{count value=$subcategories print="Y"}"><IMG src="{if $current_category.icon_url}{$current_category.icon _url}{else}{$xcart_web_dir}/icon.php?categoryid={$cat}{/if}"></TD> {assign var="first_subcat" value="Y"} {/if} <TD align="left" width="95%"> <A href="home.php?cat={ $subcat.categoryid }"><FONT class="ItemsList">{ $subcat.category|escape }</FONT></A><BR></TD> <TD align="right" nowrap><FONT class="Text">{if $config.Appearance.count_products eq "Y"} {if $subcat.product_count}{ $subcat.product_count } {$lng.lbl_products} {elseif $subcat.subcategory_count}{ $subcat.subcategory_count } {$lng.lbl_categories|lower} {/if} {/if}</FONT></TD> </TR> {/foreach} </TABLE> {/if} {if $tmp and $products ne "" } <BR clear="left"> <HR size="1" noshade> {/if} {if $products} {if $sort_fields} <DIV align="right">{include file="main/search_sort_by.tpl" sort_fields=$sort_fields selected=$search_prefilled.sort_field direction=$search_prefilled.sort_direction url="home.php?cat=`$cat`&"}</DIV> {/if} {if $total_pages gt 2} <BR> { include file="customer/main/navigation.tpl" } {/if} <HR size="1" width="100%"> {include file="customer/main/products.tpl" products=$products} {/if} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {/capture} {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"} {if $products eq ""} {if $f_products ne ""} <P> {include file="customer/main/featured.tpl"} {/if} {/if} { include file="customer/main/navigation.tpl" } HTML for graphic... <td style="width: 100%;"> <img src="/skin1/images/title_categories.gif" align="absmiddle" border="0" height="26" width="170"><font class="VertMenuBoxNewsTitle"></font> </td> Pardon my ignorance but I hope this is what you wanted and the style in which you wanted it dsplayed.
__________________
Aspen Best Buy Network X-Cart 4.0.19 Unix |
|||||||||
#4
|
|||||||
|
|||||||
Re: Unwanted Space in Main/SubCategories.tpl
That's fine. Two things you need to do:
1. Remove the second <p> at the top of the subcategories template 2. Get rid of the table in your code for the graphic. Use this: <img src="/skin1/images/title_categories.gif" border="0" height="26" width="170" alt=""> No need for the font tag or table cells.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#5
|
|||||||||
|
|||||||||
Re: Unwanted Space in Main/SubCategories.tpl
Remove second <p>... didn't seem to matter. Not sure what you mean by 'get rid of table in your code'. All I did was replace the default dingbats graphic with the title_categories.gif in the includes at the bottom of the customer/subcategories.tpl.
but here's that template... {* $Id: categories.tpl,v 1.23 2004/06/24 09:53:29 max Exp $ *} {capture name=menu} {if $active_modules.Fancy_Categories ne ""} {include file="`$fancycategories_config.modules_path`/fancy_categories.tpl"} {else} {if $config.General.root_categories eq "Y"} <div id="categories"> {section name=cat_num loop=$categories} <A href="home.php?cat={$categories[cat_num].categoryid}" class="VertMenuItems">{$categories[cat_num].category}</A> {/section} </div> {else}<div id="categories">{section name=cat_num loop=$subcategories} <A href="home.php?cat={$subcategories[cat_num].categoryid}" class="VertMenuItems">{$subcategories[cat_num].category}</A> {/section} </div> {/if} {/if} {/capture} { include file="menu.tpl" dingbats="title_categories.gif" menu_title=$lng.lbl_categories_store_head menu_content=$smarty.capture.menu } Let me know if I'm missing your point... I probably am!
__________________
Aspen Best Buy Network X-Cart 4.0.19 Unix |
|||||||||
#6
|
|||||||
|
|||||||
Re: Unwanted Space in Main/SubCategories.tpl
You aren't understanding what I'm saying. You said you used this for your category graphic in the category description:
<td style="width: 100%;"> <img src="/skin1/images/title_categories.gif" align="absmiddle" border="0" height="26" width="170"><font class="VertMenuBoxNewsTitle"></font> </td> I'm saying use this instead: <img src="/skin1/images/title_categories.gif" border="0" height="26" width="170" alt="">
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#7
|
|||||||||
|
|||||||||
Re: Unwanted Space in Main/SubCategories.tpl
The only place I found to replace the image source was in the menu.tpl. When I changed it, it changed the title to all my other title headers.
Here's what's contained in the menu.tpl... <table border="0" cellpadding="0" cellspacing="0" style="width:100%;"> <tr> <td style="width:100%;"><TABLE border="0" cellpadding="0" cellspacing="0" style="width:100%;"> <tr> <TD style="width:100%;"> <img src="{$ImagesDir}/{if $dingbats ne ''}{$dingbats}{else}spacer.jpg{/if}" width="170" height="26" border="0" />{if $link_href} {$menu_title} {else} <font class="VertMenuBoxNewsTitle">{$menu_title}</font> {/if}</td> </tr> </table></td> </tr> <tr> <td class="VertMenuBox"> {$menu_content} </td></tr> </table>
__________________
Aspen Best Buy Network X-Cart 4.0.19 Unix |
|||||||||
#8
|
|||||||
|
|||||||
Re: Unwanted Space in Main/SubCategories.tpl
No..you still aren't understanding me. Sorry, perhaps someone else can explain it better.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
#9
|
|||||||||
|
|||||||||
Re: Unwanted Space in Main/SubCategories.tpl
I doubt it... sorry but I just don't understand which template contains the info you requested I change.
All I remember doing was uploading my graphic into the image directory and changing the 'dingbats' info in the categories.tpl to my graphic... this is where I changed to my graphic { include file="menu.tpl" dingbats="title_categories.gif" menu_title=$lng.lbl_categories_store_head menu_content=$smarty.capture.menu } Thanks for trying.
__________________
Aspen Best Buy Network X-Cart 4.0.19 Unix |
|||||||||
#10
|
|||||||
|
|||||||
Re: Unwanted Space in Main/SubCategories.tpl
Ok, let's try this again. This has nothing to do with menu.tpl, categories.tpl or anything in the left hand column. This is related to subcategories.tpl and how you have uploaded the image for the subcategory heading. So get template editing out of your head, I'm referring to the image you uploaded for the subcategory header..the 'Electronics' graphic in your example above. The code I asked you to replace was THAT code, what you entered in the category description box of that category.
__________________
Padraic Ryan Ryan Design Studio Professional E-Commerce Development |
|||||||
|
|||
X-Cart forums © 2001-2020
|