[SOLVED] Custom image as header

Moderator: crythias

Post Reply
ruzzetto

[SOLVED] Custom image as header

Post by ruzzetto »

Hi,
i saw different otrs installation on internet where the customer portal is customized with a custom image instead the custom written that could be set in Frontend:Customer:CustomerHeadline.

I suppose i should install a new skin or install a graphic template, am i right?

Thanks,
Fabio
Last edited by ruzzetto on 04 May 2017, 15:21, edited 1 time in total.
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Custom image as header

Post by root »

Search the SysConfig for logo
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ruzzetto

Re: Custom image as header

Post by ruzzetto »

@root i've already changed customer logo with a new one and changed header with "My support Portal..." i don't want a type but a unique image set as header and logo....

thanks
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Custom image as header

Post by root »

Got it, then try to copy Kernel/Output/HTML/Templates/Standard/CustomerHeader.tt to Custom/Kernel/Output/HTML/Templates/Standard/CustomerHeader.tt and play around with this.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ruzzetto

Re: Custom image as header

Post by ruzzetto »

ok, thansk @root. The file you suggested me has this code:

Code: Select all

[%- INCLUDE "HTTPHeaders.tt" -%]

<!DOCTYPE html>
<html>
[% InsertTemplate("Copyright.tt") %]
[% InsertTemplate("CustomerHTMLHead.tt") %]
<body class="NoJavaScript [% Data.BodyClass | html %]">
<!-- start CI layout -->
    <div id="Header">
[% RenderBlockStart("HeaderLogo") %]
        <div id="Logo"></div>
[% RenderBlockEnd("HeaderLogo") %]
        <h1 class="CompanyName">
            <a href="#">[% Config("CustomerHeadline") %]</a>
        </h1>
[% RenderBlockStart("DebugRTLButton") %]
        <button onclick="Core.Debug.SimulateRTLPage();" type="button">Simulate RTL</button>
[% RenderBlockEnd("DebugRTLButton") %]
    </div>
<!-- end CI layout -->
<!-- end header -->
....i tried to insert image link into "a href".....i suppose it's there but does not work
ruzzetto

Re: Custom image as header

Post by ruzzetto »

my fault , with <img src> i fixed. Trying to get image responsive now. CustomerHeader.tt just modify layout once the user is logged-in, but the image is not shown on customer.pl login page.
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Custom image as header

Post by root »

Must be something wrong, the CustomerHeader.tt is included in the CustomerLogin (see Kernel/Output/HTML/Templates/Standard/CustomerLogin.tt).

Please show your changed template.
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ruzzetto

Re: Custom image as header

Post by ruzzetto »

@root you're right now i can see the image in login page too but there's something strange: i'm changing several images and i'm noticing images in login page are in the cache, altough i cleared the browser cache
RStraub
Znuny guru
Posts: 2210
Joined: 13 Mar 2014, 09:16
Znuny Version: 6.0.14
Real Name: Rolf Straub

Re: Custom image as header

Post by RStraub »

Did you try clearing the OTRS cache?
Currently using: OTRS 6.0.14 -- MariaDB -- Ubuntu 16 LTS
ruzzetto

Re: Custom image as header

Post by ruzzetto »

with /bin/otrs.DeleteCache.pl?
ruzzetto

Re: Custom image as header

Post by ruzzetto »

@root is there a way to remove the thin framework around the image? my code is:

Code: Select all

[%- INCLUDE "HTTPHeaders.tt" -%]

<!DOCTYPE html>
<html>
[% InsertTemplate("Copyright.tt") %]
[% InsertTemplate("CustomerHTMLHead.tt") %]
<body class="NoJavaScript [% Data.BodyClass | html %]">
<!-- start CI layout -->
    <div id="Header">
[% RenderBlockStart("HeaderLogo") %]
        <div id="Logo"></div>
[% RenderBlockEnd("HeaderLogo") %]
        <h1 class="CompanyName">
            <img src="myimage.png" style='width:100%; height:100%'/>[% Config("CustomerHeadline") %]
        </h1>
[% RenderBlockStart("DebugRTLButton") %]
        <button onclick="Core.Debug.SimulateRTLPage();" type="button">Simulate RTL</button>
[% RenderBlockEnd("DebugRTLButton") %]
    </div>
<!-- end CI layout -->
<!-- end header -->
when the page loads it looks like
Cattura.PNG
You do not have the required permissions to view the files attached to this post.
root
Administrator
Posts: 3960
Joined: 18 Dec 2007, 12:23
Znuny Version: Znuny and Znuny LTS
Real Name: Roy Kaldung
Company: Znuny
Contact:

Re: Custom image as header

Post by root »

What's the location of myimage.png in the filesystem?
Znuny and Znuny LTS running on CentOS / RHEL / Debian / SLES / MySQL / PostgreSQL / Oracle / OpenLDAP / Active Directory / SSO

Use a test system - always.

Do you need professional services? Check out https://www.znuny.com/

Do you want to contribute or want to know where it goes ?
ruzzetto

Re: Custom image as header

Post by ruzzetto »

/opt/otrs/var/httpd/htdocs/skins/Customer/default/img/myimage.png

but to let users to view it i used:

/otrs-web/skins/Customer/default/img/myimage.png

thanks
ruzzetto

Re: Custom image as header

Post by ruzzetto »

nobody could help me?
ruzzetto

Re: Custom image as header

Post by ruzzetto »

fixed.
Post Reply