I'm going to use "Featured News" Nugget in index.tpl. I'm using the
Code: Select all
{serendipity_fetchPrintEntries full=false fetchDrafts=false noSticky=true limit="0,5" template="featuredentries.tpl"}
Code: Select all
{serendipity_hookPlugin hook="entries_header" addData="$entry_id"}
{foreach from=$entries item="dategroup"}
{foreach from=$dategroup.entries item="entry"}
{if $entry.properties.ep_featured}
<li class="clearfix">
<div class="sidebar-preview">
<a href="{$entry.link}" rel="bookmark" title="Permanent Link to {$entry.title}">
<img src="{$entry.properties.ep_postimage}" alt="{$entry.title}">
</a>
</div>
<div class="sidebar-content">
<a href="{$entry.link}" rel="bookmark" title="Permanent Link to {$entry.title}">{$entry.title}</a>
<span><a href="{$entry.link}#comments" title="Read Comments">2 Comments</a></span>
</div>
</li>
{/if}
{/foreach}
{/foreach}
{serendipity_hookPlugin hook="entries_footer"}
My problem is the "limit="0,5" in FetchPrintEntries. It's just displaying the last 5 Entries and only if they're using the "featured" customfield. When I have for example 15 Entries and the first two and the last 2 use the "featured" customfield it only displays the first two because the last two are out of the range of "limit=0,5".
How can I get the last 5 "featured" entries?
Thanks in advance,
lordcoffee