From ba22ddefaa3aebfa6b6de9171c4e467233699053 Mon Sep 17 00:00:00 2001 From: Marc Scholten Date: Mon, 10 Aug 2020 19:08:09 +0200 Subject: [PATCH] Added docu on disabling the layout for a single view --- Guide/view.markdown | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Guide/view.markdown b/Guide/view.markdown index 8f3cbf274..ffcec77da 100644 --- a/Guide/view.markdown +++ b/Guide/view.markdown @@ -78,6 +78,16 @@ instance ViewSupport.CreateViewContext ViewContext where pure viewContext ``` +### Disabling the Layout for a View + +You can disable the layout for a specific view by overriding the `beforeRender` function like this: + +```haskell +instance View MyView ViewContext where + beforeRender (context, view) = (context { layout = \view -> view }, view) + + -- ... +``` ## Common View Tasks