Creating ifs in onyx is with this syntax with example:
#if($props->case_1)
<h1>case 1</h1>
#elseif($props->case_2)
<h1>case 2</h1>
#else
<h1>case 3</h1>
#endif
Foreach syntax with example:
#foreach($props->animals as $key => $animal)
<li>{$key + 1}. {$animal->attributes->latin_name}</li>
#endforeach
Loops syntax with example:
#for($i = 0; $ < 10; $i++)
#assign{$j = 0}
#while($j < $i)
<span>*</span>
#assign{$j++}
#endwhile
<br>
#endfor