X-Cart: shopping cart software

X-Cart forums (https://forum.x-cart.com/index.php)
-   Changing design (https://forum.x-cart.com/forumdisplay.php?f=51)
-   -   dynamically assign right or left to align tag (https://forum.x-cart.com/showthread.php?t=28827)

ferdi 02-13-2007 12:25 PM

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.

phpmattk 02-13-2007 03:50 PM

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}">


ferdi 02-14-2007 12:02 AM

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.


All times are GMT -8. The time now is 11:50 PM.

Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.