Best way to create a notifications system in nav bar - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Support (https://forum.codeigniter.com/forumdisplay.php?fid=30) +--- Thread: Best way to create a notifications system in nav bar (/showthread.php?tid=77802) |
Best way to create a notifications system in nav bar - AngelRodriguez - 10-20-2020 Hi, I want to create a "notification system" with an icon in the nav bar that shows the notifications. This notifications shows in every page. What is the best way to do this? I have 2 different "base controller". 1 for logged users and 1 for not-logged users. Regards. RE: Best way to create a notifications system in nav bar - Pfeilei - 10-20-2020 Do you want to create the notification system only for the user they are logged in? RE: Best way to create a notifications system in nav bar - nc03061981 - 10-21-2020 Notification System = Controller + Model + View, and it show every page load or ajax request RE: Best way to create a notifications system in nav bar - AngelRodriguez - 10-21-2020 Pfeilei, the notification shows to everyone, logged or not. Nc03061981, the controller is for the page. Inside the page there is a nav bar with the notifications. How can use the page controller and the notification controller at same time? RE: Best way to create a notifications system in nav bar - T.O.M. - 10-21-2020 You can use notification library (instead of notification controller) and call it in page controller. Alternatively you can use View Cells or View Partials in your main layout - depending on how you organize the output. RE: Best way to create a notifications system in nav bar - InsiteFX - 10-21-2020 With that I would go with what @T.O.M. but use view cells this way you can always customize it in one location. RE: Best way to create a notifications system in nav bar - AngelRodriguez - 10-21-2020 Ok, View Cells is a good solution. Thank you |