Availability
blojsom 3.2
Description
Loads a number of previous entries when a single entry (or permalink) is requested.
Installation and Setup
In your /WEB-INF/classes/blojsom-plugins.xml file, add the following:
<bean id="previous-entries" class="org.blojsom.plugin.previous.PreviousEntriesPlugin" init-method="init" destroy-method="destroy">
<property name="fetcher">
<ref bean="fetcher"/>
</property>
</bean>
You may then add "previous-entries" to one of the flavor-based plugin chains.
Usage and URL Parameters
Properties
The following table describes the properties that control the operation of this plugin.
| Property name |
Default Value |
Description |
| plugin-previous-entries-num |
10 |
Number of previous entries to load. |
Context Attributes and Types
The following table describes the context attributes that are available and their associated type.
| Context key |
Input or Output |
Type |
Description |
| PLUGIN_PREVIOUS_ENTRIES |
Output |
org.blojsom.blog.Entry[] |
Array of entry objects that can be displayed in your template, for example, in the sidebar. |
Usage
You can use any appropriate code in your template to loop over and display the previous entries that are available.