From a template, how can you order entries by one field, and if that field is empty a different field? Is it possible to put conditions on the ordering of a loop of entries? 

I have two fields: title and alphaTitle. I want to order alphabetically, by alphaTitle if it has a value, otherwise by title. Title will always have a value but I only want to order by title if there is no alphaTitle. I've been having some trouble figuring out if this is possible or how to do it - any chance someone can point me in the right direction?
There are several ways you could attack this, but probably the easiest is directly from the SQL side with something like this using a SQL CASE statement:

{% set entries = craft.entries.section('news').order('(CASE WHEN field_alphaTitle IS NULL OR field_alphaTitle = "" THEN title ELSE field_AlphaTitle END)').find() %}

&lt;ul&gt;
    {% for entry in entries %}
        &lt;li&gt;TITLE = {{ entry.title }} / ALPHA TITLE = {{ entry.alphaTitle }}&lt;/li&gt;
    {% endfor %}
&lt;/ul&gt;


Note that is assuming that alphaTitle is a custom field and title is the standard one available to all entries.