logic:else
AJAX
ajax:delayedload ajax:event ajax:navigation ajax:region
Data
data:calendar data:column data:eventrepeater data:postrepeater data:productbrandrepeater data:productcategoryrepeater data:productrepeater data:repeater data:table data:template data:tree
Forms
forms:address forms:captcha forms:checkbox forms:checkboxgroup forms:codeeditor forms:combobox forms:datepicker forms:dialogbox forms:editbox forms:fileupload forms:form forms:hidden forms:money forms:officeuseregion forms:option forms:password forms:paymentmethod forms:radiobutton forms:radiobuttongroup forms:row forms:searchbox forms:signature forms:slider forms:spinbox forms:submitbutton forms:submitimage forms:submitlink forms:successcontent forms:textarea forms:timepicker
Layout
layout:gallery layout:productgallery layout:rotator layout:stepper layout:stepperpanel layout:tablist layout:tablistitem
Logic
logic:dependency logic:else
ATTRIBUTES
EXAMPLES
logic:if logic:include logic:parse logic:variable
Navigation
navigation:breadcrumbs navigation:item navigation:primary navigation:secondary
Personalisation
personalisation:firstname personalisation:fullname personalisation:lastname personalisation:other
Standard
standard:audio standard:embed standard:icon standard:image standard:link standard:script standard:tooltip standard:video
Templates
templates:button templates:card templates:column templates:fancybox templates:faq templates:flexlayout templates:header templates:row templates:section templates:styles templates:teammember templates:testimonial
Regions
regions:content regions:contentadditional regions:security regions:togglable
Third Party
thirdparty:googlemap thirdparty:googlemapmarker

<logic:else> </...>

Defines an alternate region to show when an If test fails. The Else tag must be defined as a sibling to an existing If tag. Contiguous Else tags with test conditions allow further conditions to be checked if the previous test fails.

Related Tutorials

Content

any
The content to show if the test condition is true.

Attributes

evaluateAt
string
Sets whether to evaluate the test during the render phase (when rendered) or when the object (and children) are being constructed

Note: Do not use when used for checking security (as child nodes may still be constructed and events processed)

Valid options: render, init
test
New
Sets the test for the statement

Tutorials

Examples

Else - Syntax

Use ELSE after an IF logic statement. Specify a block of code to be executed if a logic IF test failed.

HTML:

<logic:if test=""> If this logic test passes, this will render. </logic:if> <logic:else test=""> If the first logic test fails, but this second test passes, this will render. </logic:else> <logic:else> If neither of the above tests pass, this will render. </logic:else>

Show a different message when a contact is logged in.

HTML:

<logic:if test="\Components\Customers\Contacts::currentIsLoggedIn()"> Welcome Back! You're logged in. </logic:if> <logic:else> You're not logged in, click here to login. </logic:else>