Welcome Guest, Not a member yet? Register   Sign In
View Decorators Video
#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


Messages In This Thread
View Decorators Video - by kilishan - 06-08-2022, 10:32 PM
RE: View Decorators Video - by iRedds - 06-08-2022, 11:13 PM
RE: View Decorators Video - by datamweb - 06-08-2022, 11:33 PM
RE: View Decorators Video - by InsiteFX - 06-09-2022, 12:04 AM
RE: View Decorators Video - by manager - 06-09-2022, 04:08 AM
RE: View Decorators Video - by demyr - 06-09-2022, 09:03 AM
RE: View Decorators Video - by RWCH - 06-21-2023, 05:34 AM



Theme © iAndrew 2016 - Forum software by © MyBB