I have working with Fuelphp and done some tiny apps, Now i am moving to bigger one, now i am stuck with this.
I have enabled theme in fuelphp and it is working perfectly, In my App there is a Top Nav bar, In Nav bar there is 3 drop down notification system like facebook & also search option. So i have created top_nav partial. I want to make the search and notification system in partial inside partial, to making it more modular, so i created another partial of top_nav_search and top_nav_notif . Both partials need some variables to transfer from controller, How i do that. My variables are passing to top_nav only. Not top_nav_search or top_nav_notif.
view() forges a new View object, and returns it. So you pass data any way you can pass data to View::forge(): as an array as second parameter, using the set() method, or the set_safe() method.
If you want to pass an individual variable (assuming a partial variable called 'var;), I suggest you use
because the variable is already escaped (or not) when passed from your code to the theme partial, and you want to pass it on to your sub-partial without alteration. If you use set(), it will escape the data, which either causes the variable to be escaped twice, or in case you had used set_safe(), it will escape something that you don't want escaping.