Recent Posts (1)
{lastposts posts=’10′}
{if $lastposts != ‘’}
<h2>Most Recent Posts:</h2>
<ul>
{foreach from=$lastposts key=id item=title}
<li><a href="{get_permalink id=$id}"title="{$title}">{$title|truncate:20:"…"}</a></li>
{/foreach}
</ul>
{/if}
Place in main index file, usually in the menu section.
Recent Posts (2)
{lastposts posts=’20′}
{counter assign=lp print=0}
{if $lastposts != ‘’}
<h2>Most Recent Posts</h2>
<ul>
{foreach from=$lastposts key=id item=details}
{counter}
{if $lp > 10}
<li><a href="{get_permalink id=$id}" title="{$details}">
{$details|truncate:30:" …"}
</a></li>
{/if}
{/foreach}
</ul>
{/if}
Place in main index file, usually in the menu section. This code shows the recent posts, minus the ones of the front page, change the ‘10′ number to the number you have on the frontpage plus one, so if you have 6 posts, change ‘10′ to 7.
Popular Posts
{popularposts}
{if $pposts != ‘’}
<h2>Popular Posts</h2>
<ul>{*counter assign=pp print=0*}
{foreach from=$pposts key=key item=hits}
<li><a href="{$hits.url}"title="{$hits.title}">{$hits.title|truncate:20:"…"}[{$key}]</a>
</li>
{/foreach}
</ul>
{/if}
Place in main index file, usually in the menu section.




