2023-10-14 08:41:21 +00:00
|
|
|
title: Conditionals/Elseif
|
|
|
|
description: Elseif conditional shortcut syntax
|
|
|
|
type: text/vnd.tiddlywiki-multiple
|
|
|
|
tags: [[$:/tags/wiki-test-spec]]
|
|
|
|
|
|
|
|
title: Text
|
|
|
|
|
2024-09-02 15:51:15 +00:00
|
|
|
This is a <%if [<something>match[one]] %>Elephant<%elseif [<something>match[two]] %>Antelope<%else%>Crocodile<%endif%>, I think.
|
2023-10-14 08:41:21 +00:00
|
|
|
+
|
|
|
|
title: Output
|
|
|
|
|
|
|
|
<$let something="one">
|
|
|
|
{{Text}}
|
|
|
|
</$let>
|
|
|
|
|
|
|
|
<$let something="two">
|
|
|
|
{{Text}}
|
|
|
|
</$let>
|
|
|
|
|
|
|
|
<$let something="three">
|
|
|
|
{{Text}}
|
|
|
|
</$let>
|
|
|
|
+
|
|
|
|
title: ExpectedResult
|
|
|
|
|
|
|
|
<p>
|
|
|
|
This is a Elephant, I think.
|
|
|
|
</p><p>
|
|
|
|
This is a Antelope, I think.
|
|
|
|
</p><p>
|
|
|
|
This is a Crocodile, I think.
|
|
|
|
</p>
|