View Single Post
  #1  
Old 10-30-2007, 11:44 AM
  SystemSkins's Avatar 
SystemSkins SystemSkins is offline
 

eXpert
  
Join Date: Oct 2007
Posts: 350
 

Default Is this correct coding?

I'm trying to get a feel for smarty coding. Please take a look at this and tell me if this is correct coding?

The original code is from the rectangle_top.tpl

Quote:
{* $Id: rectangle_top.tpl,v 1.25 2006/02/07 08:09:51 max Exp $ *}
<table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"100%"}">
<tr><td class="Container">

It is to my understanding that this is the file where you can change the width of both your "customer" and "admin" x-cart.

I want my cart/website to be optimized for the 1024 x 768 resolution. Thus I am trying to set my cart with to 970px.

I personally use a 23" Widescreen and prefer to keep my admin area at 100%

With ZERO knowledge of smarty I have figured out (by reading on these forums) how to do what I want.

Here is my new code:

Quote:
{* $Id: rectangle_top.tpl,v 1.25 2006/02/07 08:09:51 max Exp $ *}
{if $usertype eq "C"}
<table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"970px"}" align="center">
<tr><td class="Container">
{else}
<table class="Container" cellpadding="0" cellspacing="0" width="{$width|default:"100%"}">
<tr><td class="Container">{/if}

This coding does what I want it to do, it makes the customer area optimized for 1024x768 and leaves admin area alone.

My question is: Did I do it the right way? or do I have too much info? or is there a better way it should read?


Thanks
__________________
Doug Rock
X-cart Gold 4.1.9
_____________________________________
Altered Cart: 1-Page checkout
Firetank: Feed Manager
Website CM: CDSEO PRO
Website CM: Product A-Z Map
Website CM: Review Approval
Website CM: Site Map Pro
Qualiteam: Sales & Stats (free version)
Reply With Quote