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