cfif
cfif is a conditional tag in ColdFusion Markup Language (CFML) used to control the execution of code on the server. It is part of the tag-based CFML syntax and is supported by major CFML engines such as Adobe ColdFusion and Lucee. The tag evaluates a boolean expression, and when true, the enclosed code runs; otherwise, the content inside the tag is skipped. cfif is commonly used to render different HTML, gate access, or branch logic in server-side scripts.
Syntax can be written in two forms. Tag form: <cfif condition> ... </cfif>, with optional <cfelseif> and
In CFScript, the equivalent is:
if (x > 5) { /* code here */ }
cfif is suitable for simple inline conditions or for more complex branching, and it can be nested