Tuesday Mar 23, 2010

Plugging into Hippo CMS

It's possible to extend the Hippo CMS, via Maven-based Wicket-style applications, as can be seen here:

The Java-side of the Wicket label seen above has this interesting Wicket-oriented code:

add(new Label("label", new LoadableDetachableModel() {
    private static final long serialVersionUID = 1L;
    protected Object load() {
        UserSession session = (UserSession) org.apache.wicket.Session.get();
        String name = session.getJcrSession().getUserID();
        DateFormat df = DateFormat.getDateTimeInstance(DateFormat.LONG, DateFormat.MEDIUM, session.getLocale());
        return df.format(new Date()) + " Hallo there "+ name + "!";

After creating the above two Maven-based applications, which I did on the command line via these great instructions, you modify your own CMS in the Hippo CMS console, which looks like this:

Then run your own CMS again, i.e., when you plug in new features, you're creating a CMS on top of the Hippo CMS. The "Hello World" message below (in "fuchsia", as one can read in the first screenshot above) is the result of the new plugin I created:

Next thing is to learn about how to create useful plugins I might want to add to the Hippo CMS. Good to know there are so many examples available here.


Geertjan Wielenga (@geertjanw) is a Principal Product Manager in the Oracle Developer Tools group living & working in Amsterdam. He is a Java technology enthusiast, evangelist, trainer, speaker, and writer. He blogs here daily.

The focus of this blog is mostly on NetBeans (a development tool primarily for Java programmers), with an occasional reference to NetBeans, and sometimes diverging to topics relating to NetBeans. And then there are days when NetBeans is mentioned, just for a change.


« March 2010 »