Add target attribute to Logo

From Request Tracker Wiki
Revision as of 16:03, 6 April 2016 by Admin (talk | contribs) (1 revision imported)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hello everyone, I am new to Request Tracker but I was asked if it was possible to add an attribute the the logo so that when clicked it would target to a new tab instead of the default self. This is possible but you will have to edit RT's code to add it in.

These instructions are for 4.0.5 or later and I am on Ubuntu 12.04. Anything earlier my not have the same paths.

Step 1

First open Terminal...

Depending on where you installed RT this path may be different. NOTE: RT default installs to opt/rt.

cd /var/www/share/html/Elements
gedit Logo

Once Logo is open you need to find the bit of code that says:

right after you see the "href='code'" and before the ">" you need to enter this bit of code: NOTE: The name LogoTarget can be changed to somethign else just make sure that you change it everywhere. I just used it because it made the most since to me


Save and close Logo.

Step 2

Now you will need to gedit can make RT crash all together and ruin your install of RT. Make sure you make a copy of RT before you make any changes and do not change anything but what this guide has stated.)

cd /var/www/etc


For ease do a (Ctrl+f) and type in logo and hit next once. You should be on:

=item C<$LogoURL>

C<$LogoURL> points to the URL of the RT logo displayed in the web UI.
This can also be configured via the web UI.


Set($LogoURL, RT->Config->Get('WebImagesURL') . "bpslogo.png");

You will need to add this bit of code right after:

=item C<$LogoTarget>

C<$LogoTarget> tells the logo URL where to go when clicked.


Set($LogoTarget, "_self");

Save and close

Step 3

Stay where you are but open

gedit and under:

Set($rtname, ''); #I would change this to the URL of your website, btw.

Add on the next line:

Set($LogoTarget, '_blank');

Save and close


Now for these changes to take effect you will need to reset you cached data by:

cd /var/www/var/mason_data

rm -r "the folder that contains the data"("" are not needed)

For example, my folder was called 3583955927.

I would also restart your apache just to be safe with:

service apache restart

and restart your instance of RT.

Your logo should now be sending you to a new tab.