technology, scones, nonsense






Subscribe to my RSS Feed



An article represents a piece of textual content for a website, along with its associated metadata.

SconeScript Interface


Name Type Descripion
link String The path part of the article's URL
meta ArgStore object The article's metadata
title String The title of the article
parent Article object The parent article (or NULL if this is the root article)
headings List of Map* A list of headings within the article (if available)
name String The article's directory name
modtime Date Last modification time

* Note: Headings are returned in a hierarchical list of maps.


create ( name : String ) [Trusted]
Create a new sub-article with the specified directory name.
remove ( name : String ) [Trusted]
Remove an existing sub-article with the specified directory name.
update ( file : File ) [Trusted]
Update this article's text with the file specified.
get_articles ( sort : String, limit : Int ) : List of Article
Get immediate sub-articles, sorted using the specified meta-information. A "!" before the meta-information reverses the sort, for example "!time" performs a reverse sort by time (most recent first).
The limit parameter limits the number of articles returned (after sorting).
get_all_articles ( sort : String, limit : Int ) : List of Article
As above, except that instead of just immediate sub-articles, all sub-articles are fetched recursively.
lookup_article ( name : String ) : Article
Lookup a sub-article by name. A "/" separated path can be given for multiple-level lookups.
add_file ( file : File ) [Trusted]
Add a file resource to the article. The file is moved to within the article's directory.
remove_file ( file : String ) [Trusted]
Remove a file resource from the article. The file is deleted from disk.
get_files ( ) : List of File
Gets a list of file resources associated with this article.
lookup_meta ( name : String ) : Any
Performs a recursive lookup for a piece of meta-information. Starting with this article and proceeding to parent article if the meta-information is not found.
Updated on 2010-07-26 16:48:31 +0000 | Requested on 2020-10-27 11:31:22 +0000