I have a 'projects' channel, that contains a 'Channel Images' field. An entry can belong to one of four categories.
On my home page, all I want to display is two of the images from the most recently added project. When you click on either small image it directs to the page of that entry.
I cannot work out how to display the two images from just the one category. My code below displays one image from one entry belonging to each category. How do i limit it to only display the image (2) from the latest entry (whatever category it belongs to)?
{exp:channel:categories channel="project" style="linear"}
{exp:channel:entries channel="project" category="{category_id}" disable="pagination|member_data" limit="1"}
<div class="{switch="w1|w2"}"><a href="projects/{category_url_title}/{url_title}" title="{title}">{proj_img}<img src="{image:url:sml}" alt="{image:title}" width="112" height="112" border="0" />{/proj_img}</a></div>
{/exp:channel:entries}
{/exp:channel:categories}
Any help is very appreciated.
Update: Kerry's answer below is close to correct, i had to make a slight alteration.
{exp:channel:entries channel="project" disable="pagination|member_data" limit="1" parse="inward"}
{exp:channel_images:images entry_id="{entry_id}" field="proj_img" limit="2" sort="asc"}
<div class="{image:switch='w1|w2'}">
<a href="projects/{categories}{category_url_title}{/categories}/{url_title}" title="{title}">
<img src="{image:url:sml}" alt="{image:title}" width="112" height="112" border="0" />
</a>
</div>
{/exp:channel_images:images}
{/exp:channel:entries}