Frontend template

From VYRE

Jump to: navigation, search

This functionality was introduced in Unify 4.7.1. If you are using a previous version this feature will not be available.

About

This feature was designed to be used with modern client side frameworks, such as AngularJS.

Frontend templates are very similar to JSP code resources: the content of template is JSP and all CRUD operations don't differ from JSP code resources in any way.

The only feature for this template that makes it distinguishable from JSP code resources is the ability to access them directly in the frontend via special URL. Assuming frontend template named sample exists in the root folder and is deployed, the following URL (accessed via HTTP GET) should return a compiled version of this template:

http://site:port/servlet/resource/frontend_template/sample

Folder support

This feature mirrors the folder structure of templates that exists in the backend. For example, if the template was placed in a folder called some_folder, it would only be accessible at

http://site:port/servlet/resource/frontend_template/some_folder/sample

Tips

As this feature allows resources to be named using extensions (e.g. sample.html) it is possible to make it appear as if a static HTML page is served.

Personal tools