I’d just like to post the solution I used in case anyone else can benefit.
I have 4 “featured” stories at the top, and 10 further stories afterwards.
I want to order the featured articles by “featured_date”, and the further articles by entry date.
I don’t want to have the same items repeating in the further articles as were in in the featured ones.
To solve the problem I made a separate template “morearticles”, and I feed it the variables it needs through the main template. I also need to generate the same entry ids as the 4 featured items with mysql in order to tell the morearticle template what not to display.
Main template code:
<ol>
{exp:channel:entries channel="news" orderby="news_featured_date|date" sort="desc|desc" limit="3" offset="1"}
<li>
<h3>{title}</h3>
<p> {news_summary}<br />
<a href="/news/{categories">Read More…</a><br />
</li><br />
{/exp:channel:entries}<br />
</ol></p>
<p> {embed="site/morearticles"<br />
channel="news"<br />
entry_id="not {exp:query sql="<br />
SELECT t1.entry_id<br />
FROM exp_channel_data AS t1, exp_category_posts AS t2, exp_channel_titles AS t3<br />
WHERE t1.channel_id = '2'<br />
AND t1.entry_id = t2.entry_id<br />
AND t1.entry_id = t3.entry_id<br />
ORDER BY t1.field_id_59 DESC, t3.entry_date DESC<br />
LIMIT 4<br />
" backspace="1"}{entry_id}|{/exp:query}"<br />
orderby="date"<br />
sort="desc"<br />
limit="10"<br />
href="/news"<br />
archivelink="/news/all/archive"<br />
archivelabel="News Archive"<br />
}
“morearticles” Embed code:
<ol id="morearticles">
{exp:channel:entries channel="{embed:channel}" category="{embed:category}" entry_id="{embed:entry_id}" orderby="{embed:orderby}" sort="{embed:sort}" limit="{embed:limit}"}
<li><a href="http://{embed:href}/{categories">{title}</a></li>
{/exp:channel:entries}
<li class="archivelink"><a href="http://{embed:archivelink}">{embed:archivelabel}</a></li>
</ol>
Hope this can help.
Cheers,
Dan