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

Version 10 (Peter Englmaier, 2011-11-22 10:37) → Version 35/39 (Mischa The Evil, 2013-10-26 02:18)

h1. HowTo add a logo to your Redmine banner

You can very easily add a logo to your Redmine banner by modifying your base.html.erb base.rhtml file.
Big thanks to "Chris Miller":/users/758 for showing me how to accomplish this :)

Note: This has been tested using the Squeejee Theme and the Classic Theme.
Note2: if you used apache2 passenger module to install redmine,the location of redmine should be @/usr/share/redmine@ instead of @/opt/redmine@

h2. Edit *Edit your @base.html.erb@ file @base.rhtml@ file*

Example:<pre>
nano /opt/redmine/app/views/layouts/base.html.erb</pre> /opt/redmine/app/views/layouts/base.rhtml&lt;/pre&gt;

Find this line:<pre>
<h1><%= page_header_title %></h1></pre>

And change it to:<pre>
<!--<h1><%= page_header_title %></h1>--></pre>

Add this line directly below:<pre>
<img src="<%= Redmine::Utils.relative_url_root %>/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/></pre>

The ruby statement @<%= Redmine::Utils.relative_url_root %>@ will produce the relative URI for your redmine installation.

Now it should look like this:<pre>
</div>

<!--<h1><%= page_header_title %></h1>-->
<img src="<%= Redmine::Utils.relative_url_root %>/images/logo.png" style="top-margin: 15px; left-margin: 15px;"/>

<% if display_main_menu?(@project) %></pre>

h2. Upload *Upload your logo logo*

Example using the scp command:<pre>
scp logo.png root@example.com:/opt/redmine/public/images</pre>

You probably should chown the uploaded logo:<pre>
chown redmine:redmine /opt/redmine/public/images/logo.png</pre>

h2. Restart *Restart your web server server*

Examples:<pre>/etc/init.d/apache2 restart</pre><pre>/etc/init.d/httpd restart</pre><pre>/etc/init.d/nginx restart</pre>