Client Templates

From HTML5 Builder
Jump to: navigation, search

Templates for client pages (web and mobile) let you use HTML5 Builder components within existing or new HTML pages.

This approach will give you a lot of flexibility. While you won’t be able to use the Design view to compose your page’s interface as a whole, you will be able to use it to design your HTML5 Builder controls; and the Template view will provide you with a preview tool to see your template rendered as your write and modify it.

Usage

Write a Template

To use a template for a client page, with the page open go to the Template view and write the template in the HTML code editor there. You can optionally load the content of an existing template (Import Template) or generate an empty HTML page to work from (Import default HTML template); you will find these actions towards the end of the Template view’s Code Editor toolbar.

Writting a template is just like writting any other HTML page, only that you can use special tags to include HTML5 Builder components in the output code. This special tag follows the syntax <h5b:ComponentClass id="ComponentName" />. For example, for a Button called Button1, the tag would read <h5b:Button id="Button1" />.

You can take advantage of the Code Insight feature to get this tag filled automatically. Just start the tag (<) and then continue typing the name of the target component; as soon as you see it in the list of available tags, you can use the arrow keys to highlight it on the list, and then hit Enter to get the tag written for you.

Stop Using a Template

If you do not want to use a template for a client page anymore, just make sure there is no code in its Template view.

See Also

Personal tools