Template and Binding

russelldb edited this page Sep 13, 2010 · 3 revisions

In the template, use:

[[[page:body(Data)]]]

In the module, bind a value to Data by doing the following:

main() ->
    #template{file = "somefile.html", bindings = [
        {'Data', SomeData} % One or more bindings here
    ]}.

body(Data) -> ...access Data from here...

More information:
http://groups.google.com/group/nitrogenweb/browse_thread/thread/f36767694f2a77b2