. .


Working with Silt

February 12, 2010 23:52:31.955

I have recieved a few questions about Silt recently, so I cleaned up the blog creation tool some (it could still use some work), and I added some basic documentation to the bundle comment. If you want to try the system out, here's what you do:

You can change the css references in View.ssp to use any of the CSS templates that come down with the installation; you could derive a new one based on them as well, using the same API that View.ssp uses. Alternatively, you can set things up any way you want using the API in class BlogSaver. For example:

blog := BlogSaver named: 'blog'.

"get all recent posts"
recentPosts := blog fetchAllRecentPosts.

"get all recent posts for a category"
recentInCategory := blog fetchBlogsbySearchCategory: someCategory

"get the most recent N posts in a category"
recentInCategory := blog fetchBlogs: howMany bySearchCategory: someCategory

"get a specific post by entry ID"
blogPost := blog entryFor: entryID

"get most recent post"
lastPost := blog blog fetchAllRecentPosts first.

To learn more about the API, look at class BlogSaver, specifically, the api categories

The server also manages "static" pages; you can create one using the administration pages. It will land in a directory named 'blog/content', where 'blog' is the name you used when you set the site up. If you edit the resulting file by hand, you'll need to tell the server that it's been changed (if you edit with the tools, it'll get handled for you). To reset by hand:

blog (Blog.BlogSaver named: 'blog') cache clearHTMLCaches.

Finally, if you want WYSIWYG online editing, you need to install TinyMCE. Download that here, and install it on your server. Edit the file editor.inc to reflect the proper location.

Technorati Tags: , ,

posted by James Robertson

 Share Tweet This