Thursday 28 January 2010 1:48:54 am
Please help me! Question: 1. Please get me variable with my domain. Example midisa.net 2. How to do comparisons of variables? Coincidence and a finding contained in the text is necessary not precisely. For example I need to find, eat a name of my domain in a variable or not. 3. How correctly to write conditions? In one cases you write {if} {else} {/if} in other cases you use {if} {elseif} {endif}. You are not confused? Please edit a code which it is resulted more low that it worked. This code is taken from a template ezurl.tpl
{if not( $attribute.content|contains('midisa.net')}
{$target = "_blank"}
{else}
{$target = "_self"} {/if}
{section show=$attribute.data_text}
<a href="{$attribute.content}" target="{$target}">{$attribute.data_text|wash( xhtml )}</a>
{section-else}
<a href="{$attribute.content}" target="{$target}">{$attribute.content|wash( xhtml )}</a> {/section}
|