1 – Setup and customization > 1.3 Viewpoint customization > Externalizing Viewpoint's view files for customization

Externalizing Viewpoint's view files for customization

If you want to customize Viewpoint past what you can do with the DataView pages in the DataviewConfig.groovy file (see Dataview and Details customization), you can externalize Viewpoint's view directory. For more information, see the Grails documentation. Externalizing the view directory allows you to customize Viewpoint's .gsp files without overwriting them.

To externalize the view files for customization

  1. In the $VIEWPOINT_HOME directory, create the following directories: /custom/grails-app.
  2. Copy the views/ directory and all its contents from the deployed .war file (/WEB-INF/grails-app/views) to the $VIEWPOINT_HOME/custom/grails-app/ directory.
  3. Open the ViewpointConfig.groovy file (found in the $VIEWPOINT_HOME directory).
  4. Uncomment the following line in the ViewpointConfig.groovy file:
  5. grails.gsp.view.dir = FileService.getViewsPath()
  6. Save your changes to the ViewpointConfig.groovy file.
  7. Restart Tomcat.
  8. When you restart Tomcat, Viewpoint will look to the files in the $VIEWPOINT_HOME/custom/grails-app/view/ directory to load the pages.

Any changes you make to the .gsp files should update nearly immediately and be visible in Viewpoint when you refresh the page.

Related topics