Explore the introductions below and discover what you
can do with Helma and Javascript on the server-side.

introductions

skins

Helma allows you to cleanly separate presentation from application logic through the use of skins. The skins are segments of HTML markup that can contain macro tags, which are replaced with dynamic content when the skin is rendered.

You will find an example for such a skin in the "welcome" application at ./apps/welcome/code/Root/example.skin

<p>This is an example of a simple skin.</p>
<p>You will find this skin at 
    ./apps/welcome/code/Root/example.skin</p>
<p>This skin is rendered by the action defined at 
    ./apps/welcome/code/Root/example_using_skin.hac</p>
<p>You can test it via the URL 
    <a href="<% response.pushLink %>">
        <% response.pushLinkText %>
    </a>
</p>

The rendering of skins is controlled by an application's actions. In the case of the "welcome" application, you will find an example of such an action at ./apps/welcome/code/Root/example_using_skin.hac

res.data.pushLink = this.href('example_using_skin');
res.data.pushLinkText = '/example_using_skin';
this.renderSkin('example');

You can test this action and see the skin rendered via the URL http://serverjs.org/example_using_skin

Skins can contain various kinds of "macro tags" such as <% response.pushLink %> used in this example skin, where the value of a dynamic URL is determined by the action and made available to the skin by setting the req.data.pushLink property.

More information about the way in which Helma defines and renders skins, and the various kinds of available Macro Tags:
/docs/Request-Response-Cycle/