Permalink
Browse files

update readme

  • Loading branch information...
1 parent 7934ad6 commit 7180ee98a03473ed3165865bb8388de01fdfa1e0 @chaslemley committed Oct 29, 2010
Showing with 21 additions and 1 deletion.
  1. +21 −1 README.md
View
@@ -18,7 +18,7 @@ Create a slim template file
= (greeting "Slim.clj")
p(id='foo' class='bar') Hello World
-Use the render-html function to convert the file to html
+Use the render-template function to convert the file to html
user=> (use 'slim.core)
nil
@@ -53,12 +53,32 @@ Produces
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<?xml version='1.0' encoding='utf-8' ?>
+### Passing data to a template
+
+ ; content of views/passed-data.html.slim
+
+ div
+ p
+ = (locals :blog-content)
+
+Produces
+
+ user=> (use 'slim.core)
+ nil
+
+ user=> (render-template "views/passed-data.html.slim" {:blog-content "Lore ipsum Dolor Sit"})
+ "<div><p>Lore ipsum Dolor Sit</p></div>"
+
## Installation
### Leiningen
[slim "0.1.3"]
+### Coming Soon
+
+1. Layouts
+
## License
Distributed under the Eclipse Public License, the same as Clojure.

0 comments on commit 7180ee9

Please sign in to comment.