I just tried to duplicate defaultLayout as "adminLayout" in a Handler module, but found the following issues:
Not in scope: data constructor `LogoutR'
In the result of the splice:
$(hamletFile "templates/default-layout-wrapper.hamlet")
Not in scope: `appExtra'
In the result of the splice:
$(hamletFile "templates/default-layout-wrapper.hamlet")
The code duplicated from defaultLayout, and the templates referenced, have only minor code changes from the standard scaffolding versions. The LogoutR refers to the Auth subsite logout route, and the appExtra is due to the scaffold inclusion of a copyright setting.
Other "top level" routes are generated correctly, and "pages" work generally through the new layout, so I guess I need to do something more to get back the extra context needed for finding those functions in scope (as if it were declared like the Yesod App instance).
What's the recommended way to create layouts other than the defaultLayout? Am I on the wrong track, or just missing something?
Thanks,
Si