Skip to content

Commit be93aa9

Browse files
committed
chore: document need for frontend model
1 parent 20b1b34 commit be93aa9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

docs/extend/notifications.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,12 @@ Open up your index.js (the forum one) and start off by importing your newly crea
302302

303303
Make sure to replace `{nameOfNotification}` with the name of the notification in your PHP blueprint (`getType()`) and replace `{NotificationTemplate}` with the name of the JS notification template we just made! (Make sure it's imported!)
304304

305+
:::tip
306+
307+
If the subject of your notification is a new model, make sure you have a frontend represantation of it registered in the frontend store. [Read more about it here](./models.md#adding-new-models-1)
308+
309+
:::
310+
305311
Let's give users an option to change their settings for your notification. All you have to do is extend the [`notificationGrid`](https://github.com/flarum/framework/blob/main/framework/core/js/src/forum/components/NotificationGrid.js)'s [`notificationTypes()`](https://github.com/flarum/framework/blob/main/framework/core/js/src/forum/components/NotificationGrid.js#L204) function
306312

307313
From [Flarum-Likes](https://github.com/flarum/likes/blob/master/js/src/forum/index.js):

0 commit comments

Comments
 (0)