# HG changeset patch # User jbe # Date 1498668696 -7200 # Node ID e7c9a80b6795ef4e325c3a4ca332efb4e34d067c # Parent 9f9a67c8f6f5522485c6ad926cf7ede60e29901b Improved documentation diff -r 9f9a67c8f6f5 -r e7c9a80b6795 framework/env/request/handler.lua --- a/framework/env/request/handler.lua Tue Jun 27 17:36:20 2017 +0200 +++ b/framework/env/request/handler.lua Wed Jun 28 18:51:36 2017 +0200 @@ -4,7 +4,7 @@ http_request -- HTTP request object ) -Called by mcp.lua to process an HTTP request. Calls request.router() and handles the request. Note: request initializers (see request.initialize()) are to be executed by mcp.lua before this function is invoked by mcp.lua. +Called by bin/mcp.lua to process an HTTP request. Calls request.router() and handles the request. Note: request initializers (see request.initialize()) are to be executed by mcp.lua before this function is invoked by mcp.lua. --]]-- diff -r 9f9a67c8f6f5 -r e7c9a80b6795 framework/env/slot/set_layout.lua --- a/framework/env/slot/set_layout.lua Tue Jun 27 17:36:20 2017 +0200 +++ b/framework/env/slot/set_layout.lua Wed Jun 28 18:51:36 2017 +0200 @@ -4,7 +4,9 @@ content_type -- content-type to be sent to the browser, or nil for default ) -This function selects which layout should be used when calling slot.render_layout(). If no layout is selected by passing nil as first argument, then no layout will be used, and the slot named "data" is used plainly. The second argument to slot.set_layout is the content-type which is sent to the browser. +This function selects which layout should be used when calling slot.render_layout() (as done by request.handler(...)). If nil is selected as layout, then no layout will be used, but the slot named "data" is used plainly. The second argument to slot.set_layout is the content-type which is sent to the browser. + +The default layout for views is "default". Actions have no default layout, but an explicit call of slot.set_layout(...) (even with nil as first argument) during request handling will cause subsequent calls of slot.layout_is_set() to return true which indicates that content (e.g. via slot.put_into("data", ...)) is available and should be rendered instead of using the action's return value to forward or redirect the user agent. --]]--