Sorry, there isn't an OR statement.
I don't think the code wouldn't work like you have it. I don't think the syntax for IF - ELSE - ELSE_IF - END_IF allows an ELSE in the middle of a number of ELSE_IFs and then continue with the ELSE_IF statements.
Here is how I would go about this. Assuming you have just 2 types of page each using one of the different code sections.
Use one of the custom fields to set a value to indicate which type of code to use for the page Then instead of having the multiple ELSE_IF statements you could just check the value of the extra page field and output the code for the appropriate type.
- Code: Select all
<tr>
<td>
[-- IF PAGE.FIELD1 "X" --]
HTML CODE HERE
[-- ELSE --]
DIFFERENT HTML CODE HERE
[-- END_IF --]
</td>
</tr>
If you want to make it a little more robust just in case someone forgets to put a value in Page.field1 and you want something different output then you could add a default value if neither of the code sections are specified
- Code: Select all
<tr>
<td>
[-- IF PAGE.FIELD1 "X" --]
HTML CODE HERE
[-- ELSE --]
[-- IF PAGE.FIELD1 "Y" --]
DIFFERENT HTML CODE HERE
[-- ELSE --]
it isn't either so have some other code you might want to use.
[-- END_IF --]
[-- END_IF --]
</td>
</tr>