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

dynamically assign right or left to align tag

 
Reply
   X-Cart forums > X-Cart 4 > Dev Questions > Changing design
 
Thread Tools Search this Thread
  #1  
Old 02-13-2007, 12:25 PM
 
ferdi ferdi is offline
 

Member
  
Join Date: Dec 2006
Posts: 12
 

Default dynamically assign right or left to align tag

Hi,
I would like to assign "right" or "left" values to the align tag depending on the reading_direction_tag which contains the values RTL or LTR.

{assign var="test" value='right'}

<td height="100" width="100%" valign="top" align="test" > </td>


Could someone help me please.

Thanks.
__________________
Gold 4.1.5
Reply With Quote
  #2  
Old 02-13-2007, 03:50 PM
 
phpmattk phpmattk is offline
 

Advanced Member
  
Join Date: Jan 2007
Posts: 44
 

Default Re: dynamically assign right or left to align tag

Code:
{if $reading_direction_tag eq "RLT"} {assign var="direction" value="right"} {else} {assign var="direction" value="left"} {/if} <td align="{$direction}">
__________________
-matt
version 4.1.5
Reply With Quote
  #3  
Old 02-14-2007, 12:02 AM
 
ferdi ferdi is offline
 

Member
  
Join Date: Dec 2006
Posts: 12
 

Default Re: dynamically assign right or left to align tag

Thanks alot matt.

The following code works as the content of reading_direction_tag is empty for LTR languages.

{if $reading_direction_tag eq ""}
{assign var="direction" value="left"}
{else}
{assign var="direction" value="right"}
{/if}

cheers.
__________________
Gold 4.1.5
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 11:20 AM.

   

 
X-Cart forums © 2001-2020