Different templates for ticket page and contact page

  • 19 October 2017
  • 4 replies

Hi There,

We are developing an integration with our crm and we would like the application on the page page to appear as a tab in the information section of the requester, but for the contact page we would like it to be displayed in another way, how could we make this difference within the files template.html and in app.js?

Thanks in advance

This topic has been closed for comments

4 replies

There is work in progress to pass context to the app. The context will help identify the location and page the app renders. 

Workaround until it is ready is to use url parameters eg., template.html?page=ticket Get the argument choose the display.

could you explain me better how to do it? should i rename the file by adding the parameters or what? and from app.js how do I select the correct template?

Alternative: You can use the following to get your current location and then manipulate the appearance with jQuery. Hope this helps.
  var path = window.location.pathname.substring(1);
var path_split = path.split("/");
var path_location = path_split[path_split.length - 2];

if (path_location == 'contacts') {
} else if (path_location == 'tickets') {



Are you using the old Freshdesk UI or the new Freshdesk Mint UI?

If you are using the v1 framework (old Freshdesk UI), the list of app locations can be found at https://developers.freshdesk.com/docs/placeholders/. You can switch the template inside the app.js by checking the page_type variable if(page_type == "ticket")

Take a look at this sample app - https://developers.freshdesk.com/docs/your-first-app/

On the v2 framework (Freshdesk Mint UI), the list of app locations is given at https://developers.freshdesk.com/v2/docs/app-locations . You are allowed to use a different template for each location, it's fairly straightforward.