Follow us on Twitter X-Cart on Facebook Wiki
Shopping cart software Solutions for online shops and malls
 

Dialog.tpl table in seperate TD with 100% width

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-15-2008, 10:53 AM
 
imimin imimin is offline
 

Senior Member
  
Join Date: Mar 2007
Posts: 195
 

Exclamation Dialog.tpl table in seperate TD with 100% width

Can someone tell me how to set the dialog.tpl in it's own <TD width="100%> so the product listings table will show up at 100% width while everything above that will show up as normal (Categories, Special and help boxes on the left and the Your Cart and Authentication boxes on the right). Or maybe I should NOT be modifying the dialog.tpl file BUT some other file. HELP PLEASE!

I tried to modify the code in the subcategories.tpl file to:

Code:
... {/capture} <TABLE> <TR> <TD width='100%"> {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" } </TR> </TD> </TABLE>

NOTICE NEW TABLE.

If my code is wacky, PLEASE correct me.

Thank you!
__________________
Demoing v4.4.2 for new site
Licensed v4.0.19
Reply With Quote
  #2  
Old 02-15-2008, 08:36 PM
  kube's Avatar 
kube kube is offline
 

X-Adept
  
Join Date: Sep 2005
Location: London: a small place East of Wales
Posts: 529
 

Default Re: Dialog.tpl table in seperate TD with 100% width

hi imimin,

Not sure how to answer this as I haven't the code available to me at the moment. Try giving the <table > a 100% width (or a specified width in pixels) - this should open up the TD of 100% with some space to breathe.

Also I can see from that snippet of code that something may not also be right.

Tables should follow the form with opening and closing tags, for example...

<table> (open table)
<tr> (open table row)
<td> (open data item)
</td> (close data item)
</tr> (close table row)
</table> (close table)

You currently have </tr></td> the wrong way round at the end of your snippet (it should be </td></tr></table>)

Also you have an open <p> (paragraph) tag, it should be closed with an ending </p> tag or itself amended to <p />. In some browsers they display differently if not properly formed.

Remember to back up ;D

Hope this helps.
Regards,
Doms
__________________
Doms
kube v4.1.9
Reply With Quote
  #3  
Old 02-21-2008, 04:39 PM
 
imimin imimin is offline
 

Senior Member
  
Join Date: Mar 2007
Posts: 195
 

Exclamation Re: Dialog.tpl table in seperate TD with 100% width

***Can someone help me here? I am just trying to increase the width of the table at the bottom of my pages that shows my product listings, KEEPING the rest of the page at the same width.

I fixed my formatting of the new table to (subcategories.tpl):

Code:
... {/capture} <TABLE width="100%"> <TR> <TD> {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" } </TD> </TR> </TABLE>

and had no change in the width of the table at the bottom of my pages. I also tried giving the TD the 100% width.

Maybe I am modifying the the wrong file?

***Can someone help me here? I am just trying to increase the width of the table at the bottom of my pages that shows my product listings, KEEPING the rest of the page at the same width.

Thank you!
__________________
Demoing v4.4.2 for new site
Licensed v4.0.19
Reply With Quote
  #4  
Old 02-21-2008, 07:03 PM
 
imimin imimin is offline
 

Senior Member
  
Join Date: Mar 2007
Posts: 195
 

Default Re: Dialog.tpl table in seperate TD with 100% width

FOR THE RECORD:

Kind of answered my own question:

To accomplish the task of increasing the width of the "products.tpl" table, the following commented out code from the "subcategories.tpl" file has to be moved to appropriate areas of a new table in the "home.tpl" file:

Code:
... <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} {* NOTE: The following commented out code was moved to relevent areas in the "home.tpl" file to modify the "products.tpl" file table width in a newly created table. *} {* {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" } *}

As an example, move the above commented out code to "home.tpl" as follows:

Code:
... { include file="poweredby.tpl" } <BR> <IMG src="{$ImagesDir}/spacer.gif" width="150" height="1" border="0"> </TD> <TD width="6">&nbsp;</TD> </TR> </TABLE> <TABLE width="100%"> <TR> <TD> {if $total_pages gt 2} <BR> { include file="customer/main/navigation.tpl" } {/if} <HR size="1" width="100%"> {include file="dialog.tpl" title=$current_category.category content=$smarty.capture.dialog extra="width=100%"} {include file="customer/main/products.tpl" products=$products} {if $products eq "" and $tmp eq "0"} {$lng.txt_no_products_in_cat} {/if} {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" } </TD> </TR> </TABLE> { include file="rectangle_bottom.tpl" } </BODY> </HTML> {/if}

This will increase the width of the "products.tpl" file to 100% of the viewing area.
__________________
Demoing v4.4.2 for new site
Licensed v4.0.19
Reply With Quote
  #5  
Old 02-22-2008, 03:41 AM
  Holub's Avatar 
Holub Holub is offline
 

X-Adept
  
Join Date: Jan 2008
Posts: 432
 

Default Re: Dialog.tpl table in seperate TD with 100% width

Hi imimin,
but is this dialog really not 100% width?
Do you want to show product list on all page?
__________________
Regards,
Anthony Holub

X-Cart Skins Store
- twenty two different skins available;
- both 4.1.x and 4.2.x versions compatible;
- refresh you store now!

Smart menu X-Cart add-on
Featured Products Slide Show X-Cart add-on
"What's New?" FREE X-Cart add-on
Reply With Quote
  #6  
Old 02-22-2008, 08:29 AM
 
imimin imimin is offline
 

Senior Member
  
Join Date: Mar 2007
Posts: 195
 

Default Re: Dialog.tpl table in seperate TD with 100% width

Yes, don't you for your categories?
__________________
Demoing v4.4.2 for new site
Licensed v4.0.19
Reply With Quote
  #7  
Old 02-22-2008, 08:41 AM
 
imimin imimin is offline
 

Senior Member
  
Join Date: Mar 2007
Posts: 195
 

Default Re: Dialog.tpl table in seperate TD with 100% width

Maybe using the term DIALOG was not correct-I wanted to resize the width of the products listing at the bottom of each category page (as well as any other page that could potentially return products at the bottom of the page).
__________________
Demoing v4.4.2 for new site
Licensed v4.0.19
Reply With Quote
  #8  
Old 02-27-2008, 08:19 AM
  Holub's Avatar 
Holub Holub is offline
 

X-Adept
  
Join Date: Jan 2008
Posts: 432
 

Default Re: Dialog.tpl table in seperate TD with 100% width

I'm so sorry, but I cannot understand you. Can you send me something like screenshot or mockup? I'll try to help you necessarily.
__________________
Regards,
Anthony Holub

X-Cart Skins Store
- twenty two different skins available;
- both 4.1.x and 4.2.x versions compatible;
- refresh you store now!

Smart menu X-Cart add-on
Featured Products Slide Show X-Cart add-on
"What's New?" FREE X-Cart add-on
Reply With Quote
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -8. The time now is 03:27 PM.

   

 
X-Cart forums © 2001-2020