Okay, I've got a page with a url that has the channel entry title in the URL. At the beginning of the page, I show the single article for that entry, but then underneath the article, I need to show all the other articles. So I can do this by setting dynamic="no" which reverts it to a normal channel:entries loop, but I would like this loop to skip and ignore the entry that is showing ta the top of the page.
I do not know how other to do this, but I put a if statement in my channel entries loop, but the problem is, I'm using switch to setup div's for a new row every third entry and the if statement messes with that.
I need the channel entries to ignore a particular entry, or I need a way to do a "continue" for the loop without messing with the switch count.
Here's my current code:
{if last_segment}
{exp:channel:entries channel="event" orderby="date" sort="desc" status="open" category="10" dynamic="no" limit="7"}
{if url_title != last_segment}
{switch="<div class='eventsRow'>||"}
<div id="{url_title}" class="event {switch="|| lastEvent"}" data-count="{count}">
<div class="pastEventConent">
<h4>{title}</h4>
<p>{excerpt}</p>
<div class="copy">
{copybox1}
</div>
<a data-tag="{url_title}" href="{title_permalink='events'}">View >></a>
</div>
</div>
{switch="||</div>"}
{/if}
{/exp:channel:entries}
{if:else}
{exp:channel:entries channel="event" orderby="date" sort="desc" status="open" category="10" offset="1" dynamic="no" limit="6"}
{switch="<div class='eventsRow'>||"}
<div id="{url_title}" class="event {switch="|| lastEvent"}" data-count="{count}">
<div class="pastEventConent">
<h4>{title}</h4>
<p>{excerpt}</p>
<div class="copy">
{copybox1}
</div>
<a data-tag="{url_title}" href="{title_permalink='events'}">View >></a>
</div>
</div>
{switch="||</div>"}
{/exp:channel:entries}
{/if}
Any help appreciated :)