How to skip a blank line caused by an undisplayed condition?

If you know your way around HTML, just go to Source view and insert <br /> inside the condition before the closing {/if} statement:

{if not empty(mobile)}Mobile phone: {mobile}<br />{/if}


It will look like this in the template:

{if not empty(mobile)Mobile phone: {mobile}
{/if}{if not empty(companyPhone)}Company phone: {companyPhone}{/if}

Skipping the blank line for Placeholder elements

Conditions nesting

You can also achieve great results with the conditions. For example this one:

{if not empty (phone)}{phone}{/if}{if not empty (mobile)}{mobile}{/if}{if empty(phone) and empty(mobile)}{companyPhone}{/if}


This nested condition states that if the user doesn't have a populated {phone} field, the {mobile} should be used instead. If even {mobile} isn't populated, the {companyPhone} will be used.

If/else

This condition is used in case you want specific information to be displayed if certain conditions are met.

As you can see in this example, if the user doesn't have his personal {phone} field completed, the general {companyPhone} will be displayed instead.

{if not empty(phone)}{phone}{else}{companyPhone}{/if}

Did this answer your question?