Skip to content

Commit

Permalink
Added docu on disabling the layout for a single view
Browse files Browse the repository at this point in the history
  • Loading branch information
mpscholten committed Aug 10, 2020
1 parent ac0e693 commit ba22dde
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Guide/view.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit ba22dde

Please sign in to comment.