CodeIgniter Forums
View Decorators Video - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: General (https://forum.codeigniter.com/forumdisplay.php?fid=1)
+--- Forum: Lounge (https://forum.codeigniter.com/forumdisplay.php?fid=3)
+--- Thread: View Decorators Video (/showthread.php?tid=82074)



View Decorators Video - kilishan - 06-08-2022

Hey all - I created a short video covering the new View Decorators in 4.2. It's only 5 minutes long and might give you some ideas on how to use it in your projects. I plan on doing several short videos like this for some of the other new features, so keep your eyes out for those.

New in CodeIgniter 4.2 - View Decorators


RE: View Decorators Video - iRedds - 06-08-2022

Good job.
Thumbs up. Subscription.


RE: View Decorators Video - datamweb - 06-08-2022

Yes!!!
This is great.
I hope this method continues.
The absence of this type of video in Codigniter is really felt.

Thanks kilishan.


RE: View Decorators Video - InsiteFX - 06-09-2022

Great video thank you @kilishan.


RE: View Decorators Video - manager - 06-09-2022

Very nice. Thank you for new video @kilishan


RE: View Decorators Video - demyr - 06-09-2022

Such videos are valuable for the community, thanks.


RE: View Decorators Video - RWCH - 06-21-2023

Hi @kilishan and/or any other senior member.

I have watched the video on decorators.  Thank you for creating this nice feature. I have implemented them with success, but I have one question (which I also asked in the comments on YouTube).

What to do if I want to have one or more specific decorators, based on my view? It is overkill to have ALL the decorators ALWAYS in the pipeline. Some views do not need to be decorated. I would like to specify which view(s) should be decorated by which decorator(s).

As a workaround, I hoped that I could set the decorators array run time, but no luck.

I ended up creating one decorator, which instantiates a SnippetProvider based on the current view (factory pattern). Works nicely, but I would have preferred the CodeIgniter framework to be a bit more flexible. Or did I miss something?

Anyhow, thanks!