@@ -101,23 +101,46 @@ Configure various features and options for the page resource. These settings con
101
101
``` php
102
102
'page_resource' => [
103
103
\Statikbe\FilamentFlexibleContentBlockPages\Models\Page::class => [
104
- // Enable call-to-action buttons in the hero section
104
+ /*
105
+ | Enable the feature to have call-to-action buttons in the hero of the page
106
+ */
105
107
'enable_hero_call_to_actions' => true,
106
-
107
- // Enable author field for pages
108
+
109
+ /*
110
+ | Enable the feature for pages to have an author
111
+ */
108
112
'enable_author' => true,
109
-
110
- // Enable parent page relationships (hierarchical pages)
113
+
114
+ /*
115
+ | Enable the feature for pages to have parent pages.
116
+ */
111
117
'enable_parent' => true,
112
-
113
- // Enable undeletable flag to protect important pages
118
+
119
+ /*
120
+ | Enable the feature for pages to have a boolean to make them undeletable.
121
+ */
114
122
'enable_undeletable' => true,
115
-
116
- // Enable the feature for pages to have a boolean to make them undeletable
123
+
124
+ /*
125
+ | Enable the replicate action on the table
126
+ */
117
127
'enable_replicate_action_on_table' => false,
118
-
119
- // Navigation sorting order in Filament admin
128
+
129
+ /*
130
+ | The Filament navigation menu sorting order of the page resource
131
+ */
120
132
'navigation_sort' => 5,
133
+
134
+ /*
135
+ | Authorisation gates for the page resource.
136
+ */
137
+ 'gates' => [
138
+ /*
139
+ | The authorisation gate to show the undeletable toggle on the edit page.
140
+ | The value should be the name of the gate to execute `Gate::allows($gateName, User $user, Page $page)`
141
+ */
142
+ 'undeletable' => 'change_undeletable',
143
+ ],
121
144
],
122
145
// Add extended page resource configurations here...
123
146
],
@@ -131,6 +154,7 @@ Configure various features and options for the page resource. These settings con
131
154
- ** enable_undeletable** : Adds a boolean field to protect important pages from deletion
132
155
- ** enable_replicate_action_on_table** : Shows the replicate action in the table
133
156
- ** navigation_sort** : Controls the order of the page resource in the Filament navigation menu
157
+ - ** gates.undeletable** : The authorisation gate to allow the deletable toggle to be shown on the page edit page.
134
158
135
159
## CMS Panel Configuration
136
160
0 commit comments