What I am trying to do is combine the output of 2 channels. They both have an image with a different name so I am trying to check the channel to determine the which image I need to output. Code below.
{exp:channel:entries channel="work" dynamic="no" limit="3"}
<a href="http://leith.co.uk/getting-blokes-thinking-drinking/">
{if channel=="work"}
<div class="latest-post latest-column" style="background-image:url({work_main_image});">
{if:elseif channel == 'latest'}
<div class="latest-post latest-column" style="background-image:url({latest_main_image});">
{/if}
<div class="latest-title"> {title}</div>
</div>
</a>
{/exp:channel:entries}