core icon indicating copy to clipboard operation
core copied to clipboard

Use ViewModel with themes

Open timurbakarov opened this issue 14 years ago • 1 comments

I wanted to use ViewModel with themes but it seems not impossible right now without tweaking the core. It would be good it there was such an option.

timurbakarov avatar Aug 03 '12 15:08 timurbakarov

Using Viewmodels is not a problem All theme class methods accept strings (which will be converted to a View object by the Theme class, or anything else that can be cast to string.

Note that as your theme views are not in the standard location, the Viewmodel won't be able to autoload the view. Instead, you will have to load it manually in the Viewmodel. See http://docs.fuelphp.com/general/viewmodels.html#/changing_view

WanWizard avatar Aug 05 '12 19:08 WanWizard