0

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}

1 Answer 1

2

try using

channel_short_name == "work"

You can find the short name in the list of channels.

Also in your channel tag, you'll need to specify both channels.

channel="work|latest"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.