Statics

alangrafu edited this page Oct 26, 2012 · 5 revisions
Clone this wiki locally

While it is possible to create html, css and js file anywhere, it is a good practice to have a common directory. Thus, using static/ you can have all the static pages in the same place. It is important to make clear that the URL of the static pages doesn't contains the word "static" in it. For example, if I define an initial, static page home.html and put it on $LODSPEAKR_HOME/static/ I will see it at http://example.org/data/home.html, assuming LODSPeaKr is installed at http://example.org/data/lodspeakr.

Variables in static pages

From version 20121026, only static HTML pages can be processed by Haanga. This means that it is possible to include variables as in regular view templates.

<html>
  <head><title>myTitle</title>
  </head>
  <body>
   {{lodspk.this.value}}
   {{uri}}
  </body>
</html>

Where {{uri}} will return the current URI. Refer to Default Values in Template for a list of available variables. Also, you can Include your own variables.

How to enable Haanga processing

It is possible to disable Haanga processing by adding the following line to settings.inc.php:

$conf['static']['haanga'] = true;

What's next?