Project

General

Profile

How to find code for call_hooks function in redmine

Added by Shivam Barthwal over 3 years ago

I have to do some development in redmine to customize it according to my own needs. I am working to hide the side bar when we open the list of issues. I find call_hook function throughout the application, and after reading the development guide, I understand that it is pretty much like a call back function, and it will be trigger the code that is embedded in that function, but I am wondering how to find the code that is hooked in that call_hook. For example:

<%= call_hook(:view_issues_sidebar_issues_bottom) %>
<%= call_hook(:view_issues_sidebar_planning_bottom) %>

<%= render_sidebar_queries(IssueQuery, @project) %>
<%= call_hook(:view_issues_sidebar_queries_bottom) %>

Where to find (:view_issues_sidebar_issues_bottom) in the app. It will help me to understand what this hook is doing.


Replies (1)

RE: How to find code for call_hooks function in redmine - Added by Bernhard Rohloff over 3 years ago

You can use hooks to inject custom content to views without the need of replacing the existing one. In a custom plugin one can subscribe to a hook and the the code gets executed when the partial or view gets rendered.
It's all described in the Plugin_Tutorial inside the wiki.

    (1-1/1)