Solved

Edit text in header of Support Portal

  • 23 September 2022
  • 16 replies
  • 670 views

Userlevel 3
Badge +6

Hello,

I was wondering if it would be possible to edit the Welcome message when you log in to the support portal. At this moment it says: Hi, How can we help you?

 

But, my "challenge” for my customer is, to get the name of the requester between ‘Hi’ and the Comma (,).

So, If I login, the welcome message will say; Hi Chris, how can we help you? 

I hope someone knows how to do this.

 

Thanks in advance!

icon

Best answer by zachary.king 23 September 2022, 18:34

View original

16 replies

Userlevel 7
Badge +16

Hi @Chris S. This is a simple change in your support portal.

Navigate to Admin > General Settings > Helpdesk Rebranding > Requester Portal Branding > Customize Portal

Then click on “Layouts and Pages” tab, then “Portal Pages” select “Portal Home”.

 

Then you want to edit the following line of code to include the dynamic placeholder {{user_info.first_name}} and then just hard code the text around it like the image below.

Do that, save and publish and you will see this as a result and it will be dynamic to who the user accessing the portal is.

Hope that helps! :)

Userlevel 3
Badge +6

Cool, that's exactly what I meant!

Thanks m8!

GreetZ!

Chris

Userlevel 3
Badge +6

Hello @zachary.king ,

Do you also know how to get this text automatically translated just like the rest?

Because all the text is translated to Hungarian when the colleagues from Hungary login, except the Welcome message… ;-)

Gr.

Chris

 

Userlevel 4
Badge +12

Hello @Chris S. 

 

You can include a condition using liquid placeholders to check the current language and render the text accordingly. 

 

For example, you can add the following code to display the translated version of the text on the portal:

{% if portal.current_language.code == "hu" %}

Szia Chris, hogyan segíthetünk?

{% elsif portal.current_language.code == "en" %}

Hi Chris, how can we help you?

{% endif %}

 

Cheers!

 

Userlevel 6
Badge +11

 

Hello @Chris S. 

 

You can include a condition using liquid placeholders to check the current language and render the text accordingly. 

 

For example, you can add the following code to display the translated version of the text on the portal:

{% if portal.current_language.code == "hu" %}

Szia Chris, hogyan segíthetünk?

{% elsif portal.current_language.code == "en" %}

Hi Chris, how can we help you?

{% endif %}

 

Cheers!

 

Hi @aravind.sundararajan 

Just to confirm:

Can we actually combine both and create something like this?

<h2 style="color:#12344D" >
{% if portal.current_language.code == "hu" %}
Szia {{user_info.first_name}}, hogyan segíthetünk?
{% elsif portal.current_language.code == "en" %}
Hi {{user_info.first_name}}, how can we help you?
{% endif %}
</h2>

 

Userlevel 3
Badge +6

And where do I paste this code?

Unfortunally, im not that programmer minded, so I wouldnt know where to add this code.

Till this part all was clear, except this one ;-)

GreetZ!

Chris

Userlevel 4
Badge +12

Hello @Chris S. 

 

It would be the same location as @zachary.king mentioned. 
 

Navigate to Admin > General Settings > Helpdesk Rebranding > Requester Portal Branding > Customize Portal

Then click on “Layouts and Pages” tab, then “Portal Pages” select “Portal Home”.

Then you want to edit the following line of code to include the dynamic placeholder {{user_info.first_name}} and then just hard code the text around it like the image below.

 

 

Cheers!

Userlevel 4
Badge +12

 

Hello @Chris S. 

 

You can include a condition using liquid placeholders to check the current language and render the text accordingly. 

 

For example, you can add the following code to display the translated version of the text on the portal:

{% if portal.current_language.code == "hu" %}

Szia Chris, hogyan segíthetünk?

{% elsif portal.current_language.code == "en" %}

Hi Chris, how can we help you?

{% endif %}

 

Cheers!

 

Hi @aravind.sundararajan 

Just to confirm:

Can we actually combine both and create something like this?

<h2 style="color:#12344D" >
{% if portal.current_language.code == "hu" %}
Szia {{user_info.first_name}}, hogyan segíthetünk?
{% elsif portal.current_language.code == "en" %}
Hi {{user_info.first_name}}, how can we help you?
{% endif %}
</h2>

 

Hello @eeha0120 

It should work but I would suggest adding the style tag inline instead to avoid any code breakages. 


{% if portal.current_language.code == "hu" %}
<h2 style="color:#12344D" >Szia {{user_info.first_name}}, hogyan segíthetünk?</h2>
{% elsif portal.current_language.code == "en" %}
<h2 style="color:#12344D" >Hi {{user_info.first_name}}, how can we help you?</h2>
{% endif %}
</h2>

 

Userlevel 6
Badge +11

Thank you very much @aravind.sundararajan 

Userlevel 6
Badge +11

Hi @Chris S. This is a simple change in your support portal.

Navigate to Admin > General Settings > Helpdesk Rebranding > Requester Portal Branding > Customize Portal

Then click on “Layouts and Pages” tab, then “Portal Pages” select “Portal Home”.

 

Then you want to edit the following line of code to include the dynamic placeholder {{user_info.first_name}} and then just hard code the text around it like the image below.

Do that, save and publish and you will see this as a result and it will be dynamic to who the user accessing the portal is.

Hope that helps! :)

This is great - ty @zachary.king 

My FS instance is quite old and I have the ugly original layout and I am not able to use {{user_info.first_name}} in my header.

Anyone know any other option?

Thanks!  :-)

Userlevel 7
Badge +16

No worries @BrynCYDEF, you could try {{portal.user.firstname}}. Here is a solution article that contains a list of Dynamic Placeholders

https://support.freshdesk.com/en/support/solutions/folders/117130

Hope that helps!

Userlevel 3
Badge +6

Hello @zachary.king @aravind.sundararajan ,


I've tried both of your options, ending with this: (for which i'm already very thankfull!)

Result: Both the text rules are now displayed…

Szia Chris, hogyan segíthetünk?

Hi Chris, how can we help you?

So, it looks like the portal does not check the language code of the portal? does it check something else maybe?

p.s. I've turned around the if and elseif and the double == to 1 = because with two == ,1 became red…

Any more ideas?

Userlevel 6
Badge +11

Hello @zachary.king @aravind.sundararajan ,


I've tried both of your options, ending with this: (for which i'm already very thankfull!)

Result: Both the text rules are now displayed…

Szia Chris, hogyan segíthetünk?

Hi Chris, how can we help you?

So, it looks like the portal does not check the language code of the portal? does it check something else maybe?

p.s. I've turned around the if and elseif and the double == to 1 = because with two == ,1 became red…

Any more ideas?

Hi @Chris S. 

Which edition of FreshService are you entitled ?

It seems that conditionals are for Pro plans and above (Growth and earlier can’t use them). Would that be the case ?

 

Please note also that you need to perform comparison, so, you need indeed to use double ==.

Try to remove the <h2> tags in the conditionals; they will be used only in your output.

 

Regards,

Elvis

Userlevel 6
Badge +11

No worries @BrynCYDEF, you could try {{portal.user.firstname}}. Here is a solution article that contains a list of Dynamic Placeholders

https://support.freshdesk.com/en/support/solutions/folders/117130

Hope that helps!

Worked great!  Finally had a chance to update the portal - lol!

TYSM! @zachary.king 

Userlevel 3
Badge +6

Hello @zachary.king @aravind.sundararajan ,


I've tried both of your options, ending with this: (for which i'm already very thankfull!)

Result: Both the text rules are now displayed…

Szia Chris, hogyan segíthetünk?

Hi Chris, how can we help you?

So, it looks like the portal does not check the language code of the portal? does it check something else maybe?

p.s. I've turned around the if and elseif and the double == to 1 = because with two == ,1 became red…

Any more ideas?

Hi @Chris S. 

Which edition of FreshService are you entitled ?

It seems that conditionals are for Pro plans and above (Growth and earlier can’t use them). Would that be the case ?

 

Please note also that you need to perform comparison, so, you need indeed to use double ==.

Try to remove the <h2> tags in the conditionals; they will be used only in your output.

 

Regards,

Elvis

Hello Elvis,

 

The customer is on Growth, that explains…

But thank you for the information!

 

GreetZ!

Chris.

Badge +1

I am an Admin on FreshDesk, but I do not see the HelpDesk Rebranding. Is there a higher level than Admin to make these changes?

Reply