How to call the controller in the template

edited Nov '15

It is a bad idea. According to pattern, View nothing should know about Controller.



2.1k

How to create a widget that can be used in different places without passing a variable,

Why you even wanna do that ? Use some service/helper or partial view.