1. There are a few blocks that are conditional blocks — they only get rendered if a condition is true. For example:
- Everything in {block:SearchPage}…{/block:SearchPage} is rendered if the page is a search results page.
- Everything in {block:IndexPage}…{/block:IndexPage} is rendered if the page contains multiple posts (tag page, day page, the home page, etc.).
- Everything in {block:PermalinkPage}…{/block:PermalinkPage} is rendered if the page contains a single "post" (post permalink pages and static pages).
2. You can also create your own conditional blocks that the user can turn on and off via appearance options. Here's the example Tumblr gave (search for "boolean" in the theme docs):
<html>
<head>
<!-- DEFAULTS -->
<meta name="if:Show people I follow" content="1"/>
<meta name="if:Reverse pagination" content="0"/>
</head>
<body>
{block:IfNotReversePagination}
<a href="...">Previous</a> <a href="...">Next</a>
{/block:IfNotReversePagination}
{block:IfReversePagination}
<a href="...">Next</a> <a href="...">Previous</a>
{/block:IfReversePagination}
{block:IfShowPeopleIFollow}
<div id="following">...</div>
{/block:IfShowPeopleIFollow}
</body>
</html>
In addition you can create conditional blocks based on whether an appearance option is filled out or empty. In Redux (the default Tumblr theme):
{block:IfHeaderImage}<img src="{image:Header}" />{/block:IfHeaderImage}
{block:IfNotHeaderImage}{Title}{/block:IfNotHeaderImage}
The first line is rendered if the user uploaded a header image in appearance options. If not, the second line is rendered.
There are no else if blocks or else blocks. Just if's and sometimes if not's. I hope this answers your question.