Add new icon to external web page

Moderator: crythias

Locked
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Add new icon to external web page

Post by HervE »

Hi,

I'd like to know how to add a new icon in the navigation bar to redirect to a web page outside OTRS.
I've tried something with this:

Code: Select all

'Link' => 'http://www.whatever.com'
but it goes to http://localhost/otrs/index.pl?http://www.whatever.com instead.

How can I do?

regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Add new icon to external web page

Post by crythias »

You could edit the appropriate dtl (maybe Header.dtl? and place the link).
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Add new icon to external web page

Post by HervE »

First thing: I'd like it to be in the same bar as the other icons, not in the header bar.

Second thing: Even in the header bar, when I add a classical HTML tag <a href=...> in Header.dtl, it doesn't appear.

HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Add new icon to external web page

Post by crythias »

edit otrs/Kernel/Output/HTML/Standard/AgentNavigationBar.dtl

in your choice of locations, see a place like this for an example

Code: Select all

<!-- dtl:block:ItemPersonal -->
          <td valign="top" align="center" class="nav">
            <div title="$Text{"$QData{"Description"}"}">
            <a href="$Env{"Baselink"}$Data{"Link"}" accesskey="$QData{"AccessKey"}" onmouseover="window.status='$JSText{"$QData{"Name"}"}'; return true;" onmouseout="window.status='';" $Data{"LinkOption"} class="navitem"><img border="0" src="$Config{"Frontend::ImagePath"}$QData{"Image"}" alt="$Text{"$QData{"Name"}"}"><br/>$Text{"$QData{"Name"}"}</a>
            </div>
          </td>
<!-- dtl:block:ItemPersonal -->
It may render (view source) as

Code: Select all

          <td valign="top" align="center" class="nav"> 
            <div title="New message (2)"> 
            <a href="/otrs/index.pl?Action=AgentTicketLockedView&Filter=New" accesskey="m" onmouseover="window.status='New message (2)'; return true;" onmouseout="window.status='';"  class="navitem"><img border="0" src="/otrs-web/images/Standard/new-message.png" alt="New message (2)"><br/>New message (2)</a> 
            </div> 
          </td> 
You should be able to throw something in there.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Add new icon to external web page

Post by HervE »

Hello,

I added a link in ItemPersonal block, right after the regular one:

Code: Select all

<!-- dtl:block:ItemPersonal -->
          <td valign="top" align="center" class="nav">
            <div title="$Text{"$QData{"Description"}"}">
            <a href="$Env{"Baselink"}$Data{"Link"}" accesskey="$QData{"AccessKey"}" onmouseover="window.status='$JSText{"$QData{"Name"}"}'; return true;" onmouseout="window.status='';" $Data{"LinkOption"} class="navitem"><img border="0" src="$Config{"Frontend::ImagePath"}$QData{"Image"}" alt="$Text{"$QData{"Name"}"}"><br/>$Text{"$QData{"Name"}"}</a>
            </div>
          </td>
          <td valign="top" align="center" class="nav">
            <div title="Whatever">
            <a href="http://www.whatever.com" accesskey="g" onmouseover="window.status='Whatever'; return true;" onmouseout="window.status='';" class="navitem"><img border="0" src="whatever.png" alt="Whatever"><br/>Whatever</a>
            </div>
          </td>
<!-- dtl:block:ItemPersonal -->
But it didn't work: nothing appears, and I even cannot see anything from it when viewing HTML source.

Then I modified only a few things from the original:

Code: Select all

<!-- dtl:block:ItemPersonal -->
          <td valign="bottom" align="center" class="nav">
            <div title="$Text{"$QData{"Description"}"}">
            <a href="$Env{"Baselink"}$Data{"Link"}" accesskey="$QData{"AccessKey"}" onmouseover="window.status='$JSText{"$QData{"Name"}"}'; return true;" onmouseout="window.status='';" $Data{"LinkOption"} class="navitem"><img border="0" src="$Config{"Frontend::ImagePath"}$QData{"Image"}" alt="$Text{"$QData{"Name"}"}"><br/>_$Text{"$QData{"Name"}"}_</a>
            </div>
          </td>
<!-- dtl:block:ItemPersonal -->
(valign="bottom", and underscores around Text, just to see.)
And guess what: I still cannot see these modifications at the rendering too.

I even tried to restart the services, but it still did nothing.

What happens? How is the code transformed from .dtl to HTML? Why are my modifications ignored?

Regards,
HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Add new icon to external web page

Post by crythias »

First: Are you using a different Theme than Standard? If yes, are you editing in that theme's folder?
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
HervE
Znuny wizard
Posts: 391
Joined: 03 Jan 2011, 17:15
Znuny Version: 3.3.8
Location: France

Re: Add new icon to external web page

Post by HervE »

Hmm...
When I saw your message, I thought to myself: Yes! he's right, that must be the reason!

But then I made the modifications in the AgentNavigationBar.dtl of my theme... and got the same negative result :(

HervE
OTRS 3.3.8 - Windows 7 - IIS7 - SQL Server - Firefox 30
Locked