21. Mai 2012

Make your Grails app show content

There is a great way to show content from inside your Grails app: Write the content in WordPress and let the WordPress plugin for Grails pull the content into the app:

The WordPress plugin provides tags for pulling content from wordpress for display in grails. ehcache is used to cache wordpress content for a 5 minute period.

Configuration is a piece of cake:

wordpress.url='http://myblog.wordpress.org/xmlrpc.php'
wordpress.blogId=0
wordpress.username='myapp'
wordpress.password='grailsrocks'

Then, display a list of your WordPress categories:

<wordpress:getCategories />

or display the latest posts by saying:

<wordpress:getRecentPosts count="5" />

And so on… Read the full story on the plugin page at grails.org.

Diese Beiträge könnten Sie noch interessieren:

Ihre Meinung ist uns wichtig

*