Blurb Plugin

  • Tags : functionality, content
  • Latest : 0.2
  • Last Updated: 11 October 2009
  • Grails version : 1.1 > *
  • Authors : bklein, mstine
2 votes
Dependency :
compile ":blurb:0.2"

Documentation

Summary

Installation

grails install-plugin blurb

Description

Blurb Plugin

The Blurb plugin allows static text in a view to be replaced with a tag which renders the text of the "blurb" you specify, so the text can be edited/updated with Grails CRUD.

Installation

From your project's home directory, run:

grails install-plugin blurb

Usage

The plugin provides a tag with this format:

<g:blurb name="myBlurbName" />

In the view that will show the content of the blurb- e.g. your Book list view- add this tag like so:

<body>
        <div class="nav">
            <span class="menuButton"><a class="home" href="${createLinkTo(dir:'')}">Home</a></span>
            <span class="menuButton"><g:link class="create" action="create">New Book</g:link></span>
        </div>
        <g:blurb name="topmain"/>
        <div class="body">
            <h1>Book List</h1>

Run your application and navigate to http://localhost:8080/<yourapp>/blurb/create. Create a new blurb with the name that was supplied to the tag:

Now navigate back to the Book list view (in this example):

Try editing the blurb you created, and then return to the Book list:

NOTE: You can use HTML in the blurb's content field.

History

2009-10-11 Added packaging.

2009-10-11 0.2 release.

Changes: made Blurb domain class Serializable so that it can be used in web flows

2009-03-24 First release.