Artisteer plugin

  • Tags: /
  • Latest: 0.4
  • Last Updated: 30 March 2011
  • Grails version: 1.3.4 > *
  • Authors: null
0 vote
Dependency:
compile ":artisteerplugin:0.4"

 Documentation  Source

Summary

Description

Plugin that provides a simple script for unpacking artisteer html zip file templates to grails.

The plugin automatically unzips the template, creates a corresponding gsp layout file which links to an unpacked version of the artisteer template.

The gsp contains applyLayout links to other layouts that the user can customize which includes footer, title, and menurendering. Examples of tags that can be used can be found under each corresponding layout file.

The plugin also provides a controller which makes it possible to upload templates on the fly with a controller. The plugin is however at this stage only meant to work offline to import templates from artisteer and is on the roadmap to work with war deployments..

It works with artisteer 2.5, and haven't been tried with artisteer 3.0.

Simply install the plugin, export your template to html format bundled as a zip file.

You also need to set the serverUrl to your specific url.. this generates fixed urls for the templates at the moment but will change soon

// set per-environment serverURL stem for creating absolute links

environments {

production { grails.serverURL = "http://www.changeme.com" }

development { grails.serverURL = "http://localhost:8080/${appName}" }

test { grails.serverURL = "http://localhost:8080/${appName}" }

}

Then type

grails generate-artisteer-template-domain

This will give you a template class that you can modify under se.webinventions.plugins.artisteer.Template

You can move the domain class if you want but then you have to set the location with a config parameter in config.groovy like. grails.artisteer.templateClassName = "your.own.package.YourOwnTemplateClassname"

Now you can start generating templates from artisteer by running the script:

grails generate-artisteer-gsp-template path/to/your/zipfile/template.zip

Then you can find your new template in the layouts directory.

You can also use the controller to upload templates on the fly. under {serverUrl}/template/ This feature is still in development but is meant to provide ability to upload templates and change site looks and feels on the fly.

Sources on github: https://github.com/webinventions/artisteergrailsplugin

Roadmap

  • Have better support for server urls so that the url is generated on the fly in the template file not fixed.
  • Make the plugin work with Aritsteer 3.0 to allow keeping all the content and menues since that is editable in artisteer 3.0.
  • Improve taglib to allow simpler inputs of new formatted content sections in gsp pages.
  • Separate into 2 plugins so that one provides pure offline template generation and the other one provides controller/domain logic for storing template information in the application.