framework-one / fw1

FW/1 - Framework One - is a lightweight, convention over configuration, MVC application framework for ColdFusion / CFML.
http://framework-one.github.io
Other
374 stars 141 forks source link

Enhance view() function to accept an action #541

Open sneiland opened 2 years ago

sneiland commented 2 years ago

Enhance view() function to accept an action instead of a path. If an action is specified call the view's associated controller to get any associated data.

Need to determine if before/after stack should be called around that view controller....

lramirez925 commented 2 years ago

Are your thinking this to somewhat mimic something similar to how fusebox was able to just reuse full controller functions to generate view data to be passed to another view?

matthewjones commented 2 years ago

imo, i wouldn't change the behavior of view(), i think allowing it to also accept an action instead of only a path would be good.

But regarding the possibility of additionally calling before/after stack, I would prefer it to be a completely new function.

lramirez925 commented 2 years ago

In a bit of agreement here, if you want a whole new functionality that will call another controller function it feels like it should be a new function that can safely handle the "embedding" behavior.