This question may be related to a http://ellislab.com/forums/viewthread/195029/ resolved thread.
Hello,
I am trying to make a straight forward photo group gallery. Meaning, a single channel with a category for each of the photo groups. Therefore, a published entry would simply need to be associated with the category (photo group).
Here is the code that I have come up with - This code is supposed to present each of the categories. Each of the categories is represented by the first photo in the group.
<table class=“phototable”>
<tr>
{exp:channel:categories channel="photos" style="linear"}
{preload_replace:catadd="{category_id}”}
{exp:channel:entries channel="photos" sort="asc" category="{embed:catadd}” limit=1}
category={category_id}
{if count==1}
<td>
_{the_photo}_
<div [removed]>
{category_name}
</div>
</td>
{/if}
{switch='||</tr><tr>'}
{/exp:channel:entries}
{/exp:channel:categories}
</tr></table>
F.Y.I. - The forum edited my code and removed my Anchor tag and made it URL for some reason.
of course this isn’t behaving like I would like it to. It seems to loop through all of the photos in a category even though I have the if statement to only output on the first entry. I added the limit=1 to help also but it doesn’t work.
Any insight? I am not opposed to doing it altogether different.