In TP template language. Both if and eq can be used to compare variables.
2eba34dcf6b1315fa8eb61e83afb62e5Content06bf94b0c2e62ce6dc5e04966c6e0770
For example:
<if condition=”$id eq 1”>
This is no problem
But if you want to compare two variables:
<if condition=”$a.id eq $b_id”>
This will cause problems
Solution:
Use the 51faf65e8b6068cf8f1bce82b64f00c3 tag:
<eq name=”a.id” value=”$b.id”>
Note: There is no need to add the $ variable symbol to the name, but the $ variable symbol is required to the value.