Sign in to edit and +1 items.
Login required
Download

Blurb Plugin

(2)
Author(s) bklein, mstine
Current Release 0.2   (2 years ago)
Grails Version 1.1 > *
Tags content  functionality 
Dependency
compile ":blurb:0.2"
Last updated by admin 3 years ago
grails install-plugin blurb
Last updated by bklein 1 year ago

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.

Last updated by admin 3 years ago
Last updated by admin 3 years ago