Skip to contents

Rendering

template() fragment()
Create a reusable HTML template
document()
HTML Document Root
form()
Form
map_tags()
Apply template function to each element of a vector
target()
Resolve a template's target selector
targets()
Combine multiple target selectors
csrf_token()
CSRF Token
register_html_serialiser()
Register HTML Serialiser
register_async_evaluator()
Register context-safe async evaluator

Rendering Performance

cache() clear_cache() invalidate_cache() invalidate_cache_here()
Cache a partial within a template
set_cache_backend()
Configure freshwater's cache backend
get_cache_backend()
Get freshwater's current cache backend

Context

current_path() current_method() current_query() current_cookie() current_header()
Get request data from current context
freshwater_context
Freshwater Request Context

Routing & URLS

endpoints()
Reverse Routing
redirect()
Redirect to another resource

Middleware

api_freshwater()
Freshwater defaults for plumber2 APIs
api_error_pages()
Freshwater Error Pages
api_csrf()
Apply CSRF Protection to a plumber2 API
api_cget()
Conditional GET
api_hooks() hook()
Route handler hooks

Defaults