in view call to controller function in cake php

i need some help

which is when i on my index.ctp/view.ctp, i need to call to my controller function to perform some task. what code i can use to perform this action?

  • i need to call to my controller function, which send in a value (user_id) to the function and get me a certain action. how can i do that? i might calling in a javascript function as well.