Howto add a logo to your Redmine banner » History » Version 3

Aaron Johnson, 2010-05-27 23:55

1 2 Aaron Johnson
h1. HowTo add a logo to your Redmine banner
2 1 Aaron Johnson
3 1 Aaron Johnson
You can very easily add a logo to your Redmine banner by modifying your base.rhtml file.
4 1 Aaron Johnson
Big thanks to "Chris Miller":/users/758 for showing me how to accomplish this :)
5 1 Aaron Johnson
6 3 Aaron Johnson
Note: This has been tested using the Squeejee Theme and the Classic Theme.
7 3 Aaron Johnson
8 1 Aaron Johnson
*Edit your base.rhtml file*
9 1 Aaron Johnson
10 1 Aaron Johnson
Example:<pre>
11 1 Aaron Johnson
nano /opt/redmine/app/views/layouts/base.rhtml</pre>
12 1 Aaron Johnson
13 1 Aaron Johnson
Find this line:<pre>
14 1 Aaron Johnson
    <h1><%= page_header_title %></h1></pre>
15 1 Aaron Johnson
16 1 Aaron Johnson
And change it to:<pre>
17 1 Aaron Johnson
     <!--<h1><%= page_header_title %></h1>--></pre>
18 1 Aaron Johnson
19 1 Aaron Johnson
Add this line directly below:<pre>
20 1 Aaron Johnson
     <img src="/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/></pre>
21 1 Aaron Johnson
22 1 Aaron Johnson
Now it should look like this:<pre>
23 1 Aaron Johnson
    </div>
24 1 Aaron Johnson
25 1 Aaron Johnson
     <!--<h1><%= page_header_title %></h1>-->
26 1 Aaron Johnson
     <img src="/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/>
27 1 Aaron Johnson
28 1 Aaron Johnson
    <% if display_main_menu?(@project) %></pre>
29 1 Aaron Johnson
30 1 Aaron Johnson
*Upload your logo*
31 1 Aaron Johnson
32 1 Aaron Johnson
Example using the scp command:<pre>
33 1 Aaron Johnson
scp logo.png root@example.com:/opt/redmine/public/images</pre>
34 1 Aaron Johnson
35 1 Aaron Johnson
You probably should chown the uploaded logo:<pre>
36 1 Aaron Johnson
chown redmine:redmine /opt/redmine/public/images/logo.png</pre>
37 1 Aaron Johnson
38 1 Aaron Johnson
*Restart your web server*
39 1 Aaron Johnson
40 1 Aaron Johnson
Examples:<pre>/etc/init.d/apache2 restart</pre><pre>/etc/init.d/httpd restart</pre><pre>/etc/init.d/nginx restart</pre>