5

The main templates I want to modify are the artifacts ones. Anyone knows how to create the artifacts templates?

In addition, it only installed these three files in the scaffolding directory: AsyncController.groovy, AsyncSpec.groovy, ScaffoldedController.groovy.

Chris Malan
  • 127
  • 1
  • 8

1 Answers1

2

In fact, there is a problem with the install-template command. In Grails version 3.1 it doesn't create the artifact directory with the views pages (gsp) as expected.

You just have to create an artifact directory and put your customized view pages in it:

/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/create.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/edit.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/index.gsp
/$YOUR_GRAIL_APP_DIR/src/main/templates/artifacts/scaffolding/show.gsp

Regards,

-- Sylvio

  • Even after adding these they are ignored by grails generate-all or generate-views. The solution was to go back to scaffolding 3.1.3 and Grails 3.0.9. That works for both install-templates and generate-*. – Chris Malan Feb 10 '16 at 09:26
  • @ChrisMalan - even using Garils 3.0.9, it creates only scafiolding forlder (main/templates/scaffolding). It does not create artifacts. – hemu Feb 23 '16 at 09:53