If
ekmTags: [ekm:if]
This tag allows you customise what information should be displayed depending on the outcome of comparing two values of your choice.
| EQUALS | |
[ekm:if]
'Which IF type we're going to be using
iftype='EQUALS';
'First numerical value
ifvalue='20';
'Second numerical value
ifvalue2='20';
'Output to be displayed if our IF statement is TRUE
ifthen='IfValue is the same as IfValue2';
'Output to be displayed if our IF statement is FALSE
ifelse='IfValue is not the same as IfValue2';
[/ekm:if]
| |
| GREATERTHAN | |
[ekm:if]
'Which IF type we're going to be using
iftype='GREATERTHAN';
'First numerical value
ifvalue='20';
'Second numerical value
ifvalue2='10';
'Output to be displayed if our IF statement is TRUE
ifthen='IfValue is greater than IfValue2';
'Output to be displayed if our IF statement is FALSE
ifelse='IfValue is less than IfValue2';
[/ekm:if]
| |
| LESSTHAN | |
[ekm:if]
'Which IF type we're going to be using
iftype='LESSTHAN';
'First numerical value
ifvalue='10';
'Second numerical value
ifvalue2='20';
'Output to be displayed if our IF statement is TRUE
ifthen='IfValue is less than IfValue2';
'Output to be displayed if our IF statement is FALSE
ifelse='IfValue is greater than IfValue2';
[/ekm:if]
| |
| IN (Useful when used with the [ekm:categoryid] tag) | |
[ekm:if]
'Which IF type we're going to be using
iftype='LESSTHAN';
'First numerical value
ifvalue='10';
'Second numerical value
ifvalue2='20';
'Output to be displayed if our IF statement is TRUE
ifthen='IfValue is less than IfValue2';
'Output to be displayed if our IF statement is FALSE
ifelse='IfValue is greater than IfValue2';
[/ekm:if]
| |
| WEBPAGE (Useful when used with the [ekm:webpagename] tag) | |
[ekm:if]
'Which IF type we're going to be using
iftype='WEBPAGE';
'The ID of the webpage we are checking to see
if it exists and is live
webpageid='1';
'This can only be TRUE
ifvalue='TRUE';
'Output to be displayed if the webpage
exists and is set live
ifthen='IfValue is less than IfValue2';
'Output to be displayed if the webpage does
not exist or is not set live
ifelse='IfValue is greater than IfValue2';
[/ekm:if]
| |
| HAS_SUB_CATEGORIES | |
[ekm:if]
'Which IF type we're going to be using
iftype='HAS_SUB_CATEGORIES';
'The ID of the category you are checking for sub categories
ifvalue='1';
'Output to be displayed if the category
does have sub categories
ifthen='IfValue is less than IfValue2';
'Output to be displayed if the category does
not have sub categories
ifelse='IfValue is greater than IfValue2';
[/ekm:if]
| |
| ELEMENT_NOT_EMPTY (Useful when used with the [ekm:element] tag) | |
[ekm:if]
'Which IF type we're going to be using
iftype='ELEMENT_NOT_EMPTY';
'The name of the element we are checking for content
ifvalue='RIGHT_MENU_AREA';
'Output to be displayed if the element has content.
In this case a simple table
ifthen='<table width="150" border="0" cellspacing="0"
cellpadding="0">
<tr><td>Table Content</td></tr></table>';
'Output to be displayed if the element has no content.
In this case it outputs nothing
ifelse=;
[/ekm:if]
| |
| IS_SELECTED | |
[ekm:if] 'Which IF type we're going to be using iftype='IS_SELECTED'; 'The name of the Category or Webpage we are checking to see if we are located in. eg. Webpage(2) where '2' is the ID of the page ifvalue='Category(1)'; 'Output to be displayed if we are in the chosen Webpage or Category. In this case a simple table ifthen='<table width="150" border="0" cellspacing="0" cellpadding="0"> <tr><td>Table Content</td></tr></table>'; 'Output to be displayed if we are not in the chosen Webpage or Category. In this case it outputs nothing ifelse=; [/ekm:if] | |


