This plugin can be used to display a list of recent articles by category.
^General Plugin info ^^
| Author: | Metanoia |
|---|---|
| Current Version: | 1.1 |
| Code: | NP_ListArticlesByCategory_code |
| Download: | np_listarticlesbycategory_v1.1.zip |
| Forum Thread: | here |
In your admin cp apply this change by going to your skins and editing the area of your skin where you want it to display.
Add the following line: <%plugin(ListArticlesByCategory,-1,5)%>
This can be explained by the following:
<%plugin(ListArticlesByCategory,numbertodisplay,categoryid)%>
So if you put in 50 in the “number to display” then only 50 will be shown (theoretically). -1 allows all items to be displayed.
putting this in main skin:
<%if(category)%> <BR> Alle berichten in de category <h2><%category%></h2>(sortering op datum) <BR><BR> <%else%> <%blog(default/index,10)%> <%endif%> <%if(category,catid,1)%> <%plugin(ListArticlesByCategory,-1,1)%><BR><BR> <%endif%> <%if(category,catid,2)%> <%plugin(ListArticlesByCategory,-1,2)%><BR><BR> <%endif%> etc (depending on how many categories you have) <%endif%>
This plugin works by listing the articles in alphabetical order. But if you want to list the articles in a specific order, you can prefix a number at your article title.
Amend the title of your article to include the number:
EG:
1. My First Post 2. My Second Post
You can also prefix the title with HTML comments but that will list the newest article on top in that order.
EG:
<!-- 1 --> My First Post <!-- 2 --> My Second Post
will results in:
My Second Post<br> My First Post
If not all parameters of the skinvar are specified correct the plugin causes MySQL error messages. It would be better to offer default settings to avoid the error messages.
NP_ListArticlesByCategory version 0.1 works with Nucleus CMS version 3.31 - 2007-11-14 kg