Skip to main content

Customize end-user portal - Show service items as one column without truncation of title and description


sebybjoseph143
Apprentice
Forum|alt.badge.img

Hello All,

 

I recently came across a use-case where a customer wanted to display their service items in the service catalog as a single column without the title and description of the service items being truncated.

Before and after images are attached to this post.

 

 

 

 

The code snippets are given below:

 
STYLESHEET:

 

Paste the below snippet in Admin → Helpdesk rebranding → Portal customization → Stylesheet.

#catalog-list-page #catalog-list-container #catalog-list-items #list-items .catalog-item{

min-width: 900px;

}

 
JQUERY:

 

Paste the below snippet in Page Layout

<script>

jQuery(document).on('PageUpdate NewContent', function() {

jQuery('#list-items').children('a').each(function () {

var itemInfo = jQuery(this).children('div.catalog-item-info'); // "this" is the current element in the loop

var shortTitle = jQuery(itemInfo).children('h4');

var shortDesc = jQuery(itemInfo).children('p');

var itemFullInfo = jQuery(this).children('div.service-item-tooltip'); // "this" is the current element in the loop

var longTitle = jQuery(itemFullInfo).children('h3');

var longDesc = jQuery(itemFullInfo).children('p');

shortTitle.text(longTitle.text());

shortDesc.text(longDesc.text());

});

});

</script>

 

Thanks!

Did this topic help you find an answer to your question?

2 replies

SamC1601
Apprentice
Forum|alt.badge.img
  • Apprentice
  • 2 replies
  • October 10, 2022

Hi,

Would you be able to provide more information as to where in the Page Layout the script should be pasted? I have tried it to no avail.

Thanks,

Sam

 

EDIT: I figured out my mistake. I mistakenly did not save after updating the stylesheet, which then didn’t allow the script to run successfully. Thank you. 


sebybjoseph143
Apprentice
Forum|alt.badge.img
SamC1601 wrote:

Hi,

Would you be able to provide more information as to where in the Page Layout the script should be pasted? I have tried it to no avail.

Thanks,

Sam

 

Hi Sam,

Can you go to Admin → Helpdesk rebranding → Portal customization → Layout & pages → Portal layout → Page layout and paste the script at the end and check if this helps?

If not, please send an email to support@freshservice.com and we can get this checked. 

Thank you!


Reply