Storemill API - Introduction


Storemill includes a powerful scripting engine. The engine provides direct access to various Storemill functions via the Storemill API. Code can be embedded in your theme's pages through use of the <* and *> tags.

There are a number of top-level objects, which you can explore to find out more about the API. These objects are listed on the left-hand side.

Example


The following simple example displays a list of news article headlines from Storemill.

<h1>Latest News</h1>
<*
var articles = articles.getArticleFeed("Latest News").getArticles();
for each (article in articles)
{ page.writeln(article.getTitle() + "<br/>"); }
*>
<hr/>

Inline


This is a convenient way of including data from a script, without having to use the page.writeln method.

<p>
Storemill Version:
<*=storemill.getVersion()*>
</p>

In Storemill you can


Embed your Elflight3D app in your website with one line of code

Embed your Elflight3D app in your website with one line of code.

Powered by Storemill © 2010 Code Frontiers Ltd