1
Just a small smarty addition for those who need to divide the articels list @ the category template in the articles module, here's a very simple way of doing that:
open your category template ( /templates/art_category.html ... or any custom template you made ) and look for the "article loop" ... around line 67 ....
before:
<{if count($articles)>0}>
<div id="article">
<div class="title">
<{php}>echo art_constant("MD_ARTICLES");<{/php}>
<{if $featured}>
(<{php}>echo art_constant("MD_FEATURED");<{/php}>)
<{/if}>
div>
<{foreach item=article from=$articles}>
<div class="title-list">
<a href="<{$xoops_url}>/modules/<{$dirname}>/view.article.php<{$smarty.const.URL_DELIMITER}>c<{$category.id}>/<{$article.id}>"><{$article.title}>a>
div>
<div class="item">
<a href="<{$xoops_url}>/modules/<{$dirname}>/view.author.php<{$smarty.const.URL_DELIMITER}><{$article.author.uid}>"><{$article.author.name}>a>
<{if $article.author.author}>(<{$article.author.author}>)<{/if}>
<{$article.time}>
div>
<{if $article.summary}>
<div class="item"><{$article.summary}>div>
<{/if}>
<div class="clear">div>
<{/foreach}>
div>
<{/if}>
After:
<{if count($articles)>0}>
<div id="article">
<div class="title">
<{php}>echo art_constant("MD_ARTICLES");<{/php}>
<{if $featured}>
(<{php}>echo art_constant("MD_FEATURED");<{/php}>)
<{/if}>
div>
<table width="100%" cellpadding="0" cellspacing="0" ">
top">
<{foreach item=article from=$articles}>
33%"> <{if $article.summary}>
item"><{$article.summary}> <{/if}>
|
<{if $category.articles is div by 3}>
<{/if}>
<{/foreach}>
clear">
<{/if}>
Of course it can be divided to the number you need, so
<{if $category.articles is div by 3}>
has to be changed along with your table cell precentage...
I do hope Phppp will add a way to sort articles as he did with categories, this is one fine module !!!!!
After 2 weeks of work with it, I simply fell in love
with it's abilities and it's simplicity ... especially for article editors (a lot can be done via the end user interface to those who has the right privilages).
There's should probably be some more vars in "category record" in order to control visibility a little more, and make the module a little bit more flexible...