Last Images plugin is a dashboard plugin for Hippo CMS 7. Here you will find instructions to obtain the plugin and how to use it.
If some of the steps are unclear you can find more documentation on plugins at the plugin tutorial.
To obtain the plugin you have two options. You can download the jar file from the documents section or you can download the source from the subversion repository.
Use the command below to get the source from the subversion repository:
svn checkout http://forge.hippo-ecm.org/svn/lastimages/trunk lastimages
You will also need to build the source. You can use the supplied maven project file for that. Just use the following command (this will invoke maven to build the plugin).
mvn install
Add a simple dependency in your projects pom file (for example quickstart/war if your are using that). Look for the dependencies section and add the following code:
<!-- Last Images plugin -->
<dependency>
<groupId>org.onehippo.addon.frontend.lastimages</groupId>
<artifactId>last-images</artifactId>
<version>1.01.00-SNAPSHOT</version>
<type>jar</type>
</dependency>
Before the plugin will display we have to give it a location on the dashboard and load it.
You will need to edit the DashboardPerspective.html file in the hippo-ecm-quickstart-war project. Add the following code on the spot where you want to display your plugin.
<h2> <span class="task">Last images</span> </h2> <div class="panel"> <div class="plugin" wicket:id="extension.lastImages">Last 5 images</div> </div>
Start the server and navigate to the console (http://localhost:8080/cms/console). Login and navigate to the following node:
/hippo:configuration/hippo:frontend/cms/cms-dashboard/dashboardPerspective
Add "extension.lastImages" to the "wicket.extensions" property. Next add a new property called "extension.lastImages" and give it the value "service.dashboard.lastimages". Now save the changes.
Note: It is assumed that you use the cms skin. If you wish to use an other skin then you should apply the above step to your own skin and copy the following node in your own skin directory.
/hippo:configuration/hippo:frontend/cms/lastImagesPlugin
It is also possible to change the number of images or even the query used to select the images. To do this navigate to the following node:
/hippo:configuration/hippo:frontend/cms-reports/lastImagesReport
There you will find the number of images that will be selected. In the sub-node "hippo:query" you will find the XPath query used to select the images.