Skip to content
This repository has been archived by the owner on Jun 23, 2023. It is now read-only.

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
pboivin authored Dec 5, 2021
1 parent 0ce2481 commit 2722784
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,23 @@ When we create a page with the `legal` template, the block editor will be prefil

When we create a page with the `custom_page` template, the block editor will be prefilled with 4 blocks.

### Update the Form

We want to show the `block_editor` field on `legal` pages as well as custom pages:

```blade
// update file: resources/views/admin/pages/form.blade.php
@section('contentFields')
...
@if (in_array($item->template, ['custom_page', 'legal']))
@formField('block_editor')
@endif
@stop
```

## Custom Template Field

You can customize the `template` field name and label with the `$templateField` property in your Model:
Expand Down

0 comments on commit 2722784

Please sign in to comment.