DotLiquid Module
A module for rendering DotLiquid template with Suave
Functions and values
| Function or value | Description |
Full Usage:
ModelKey
Returns: string
|
|
Full Usage:
page fileName model ctx
Parameters:
string
model : 'a
ctx : HttpContext
Returns: Async<HttpContext option>
|
Render a page using DotLiquid template. Takes a path (relative to the directory specified
using `setTemplatesDir` and a value that is exposed as the "model" variable. You can use
any F# record type, seq<_>, list<_>, and array<_> and option without having to explicitly
register the fields.
type Page = { Total : int }
let app = page "index.html" { Total = 42 }
|
Full Usage:
registerFiltersByName name
Parameters:
string
|
|
|
|
Full Usage:
renderPageFile fileFullPath model
Parameters:
string
model : 'm
Returns: Async<string>
|
|
Full Usage:
renderPageString template model
Parameters:
string
model : 'm
Returns: Async<string>
|
|
Full Usage:
setCSharpNamingConvention arg1
Parameters:
'a
|
|
Full Usage:
setRubyNamingConvention arg1
Parameters:
'a
|
|
Full Usage:
setTemplatesDir dir
Parameters:
string
|
Set the root directory where DotLiquid is looking for templates. For example, you can
write something like this:
DotLiquid.setTemplatesDir (__SOURCE_DIRECTORY__ + "/templates")
The current directory is a global variable and so it should not change
between multiple HTTP requests. This is a DotLiquid limitation.
|