public
Description: Nitrogen Web Framework for Erlang
Home | Edit | New

Template and Binding

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

Last edited by russelldb, Tue May 26 13:47:22 -0700 2009
Home | Edit | New
Versions: