Reputation: 128
{% set i = 0 %}
{% set i = i + 1 %}
{% if i % 2 == 0 %}
i am trying to change this set and i operator to change this code . this is the twig file code . how can we write this code in tpl file .I am facing problem to solve condition operators like this specially f i % in above three codes . mean how can i convert this line in tpl exactly. i am converting opencart 3.0.2.0 theme into opencart 2.3.0.2 . i tired my best to understand how to change this code in tpl but could't manage to solve it . thanks
Upvotes: 1
Views: 400
Reputation: 533
You can write above code in .tpl like this
<?php
$i = 0;
$i++;
if($i%2==0){}
?>
Upvotes: 1