A
A
Alexander2014-04-20 12:32:58
PHP
Alexander, 2014-04-20 12:32:58

smarty question - if construct

Good day. Sorry if this is a dumb question, I just don't understand it well.
There is a site with templates, smarty is used. I have written a function that replaces {free} in the template with one.
I need to do something to make it If 1 - then something, if not - something else.
Well, roughly speaking, you need to display different content depending on this unit.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DDanya, 2014-04-20
@DDanya

The if construct in Smarty

M
Maxim, 2014-04-20
@iru

{if $i==10}
  Равно 10
{else:}
   Не равно 10
{/if}

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question