2019.1

Table Of Contents
var localJSON = loadjson('snippets/jsonsnippet.json');
if(localJSON.post){
results.html("<h3>" + localJSON.post.title + "</h3><p>" +
localJSON.post.modified + "</p>");
}
This script retrieves a post from a WordPress site.
var wpPost = loadjson('http://192.168.101.58/2013/06/leave-the-
third-dimension-behind-and-focus-on-real-printing-
innovation/?json=1');
if(wpPost.post){
results.html("<h1>" + wpPost.post.title + "</h1>"
+ wpPost.post.content);
}
This script retrieves multiple posts from a WordPress site.
var numPosts = 3;
var wpPost = '';
var wpRecentPosts = loadjson('http://192.168.101.58/?json=get_
recent_posts&count=' + numPosts);
if(wpRecentPosts.posts){
for (var i = 0; i < numPosts ; i++) {
wpPost += "<p>" + wpRecentPosts.posts[i].title + "</p>";
}
}
results.after(wpPost)
loadtext()
Loads text from the specified text file, for example a JavaScript file (.js) or style sheet (.css).
The text file may be located inside the template or hosted on a Content Management System or
on another location outside the template.
Tip
To load an HTML fragment, you can use use loadhtml() (see
Skin/Formats/CrossReferencePrintFormat("loadhtml()Loads HTML content from the specified
HTML file. The file may be located inside the template (see
Skin/Formats/CrossReferencePrintFormat("Snippets" on page1)) or hosted on a Content
Page 803