Welcome Guest, Not a member yet? Register   Sign In
View Decorators Video
#1

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
Reply
#2

Good job.
Thumbs up. Subscription.
Reply
#3
Heart 

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

Thanks kilishan.
Reply
#4

Great video thank you @kilishan.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )
Reply
#5

Very nice. Thank you for new video @kilishan
Reply
#6

Such videos are valuable for the community, thanks.
Reply
#7

(This post was last modified: 06-21-2023, 02:08 PM by RWCH. Edit Reason: Being a bit more clear (I hope) )

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!
Reply




Theme © iAndrew 2016 - Forum software by © MyBB