If you signed up before Aug 9, 2021, please click Previous plans to view your applicable plans.
Dynamic placeholders are a set of variables that can be replaced with the actual values. Freshdesk provides a set of placeholders you can use to customize your customer portal themes using the code editor. For a general overview of Freshdesk themes and how you can customize them, see Customize Portal Appearance (Themes).
For example, you can use the {{portal.articles_count}} in the Solutions () tag to display the total number of solution articles in your portal.
This article contains:
Placeholder categories
Freshdesk provides placeholders for the following categories:
Global
Includes placeholders you can use in your support portal or in the header or footer area.
Placeholder | Return Type | What they mean |
portal.name | string | Name or Title of the portal |
portal.language | string | Selected language (English, French etc.) |
portal.logo.url | url | Default or Custom logo from the portal |
portal.linkback.url | url | Linkback URL from Freshdesk |
portal.contact.info | url | Phone number specified in Freshdesk |
portal.login.url | url | Login URL of the support portal (also available to anonymous users) |
portal.logout.url | Logout URL of the support portal (also available to anonymous users) | |
portal.can.signup.feature | boolean | True or false based on whether signups are allowed or not |
portal.signup.url | url | Signup URL of the support portal |
portal.new.ticket.url | url | URL to the new ticket creation page |
portal.new.topic.url | url | URL to create a new forum topic |
portal.my.topic.url | URL to the user's preferred topic | |
portal.profile.url | url | URL to the profile of a specific user |
recent.articles | collection of articles | list of recently added articles across the portal |
language.code | string | Current language selected on the portal |
language.name | string | Current language selected on the portal |
language list | string | List of lang |
Solutions
Includes dynamic placeholders specific to solutions articles to help your customers better.
Solution Categories
Includes placeholders specific to each solution category:
Placeholder | Return Type | What they mean |
category.name | string | Name of the solution category |
category.description | string | Description of the solution category |
category.id | number | Unique ID of the solution category |
category.url | url | URL pointing to the solution category |
category.folders | collection of folders | Folders in the category based on visibility |
category.folders_count | number | Folders count in the category based on visibility |
Solution Folders
Includes placeholders specific to Solution folders:
Placeholder | Return Type | What they mean |
folder.name | string | Name of the solution folder |
folder.description | string | Description of the solution folder |
folder.id | number | Unique ID of the solution folder |
folder.url | url | URL pointing to the solution folder |
folder.category | solution category | Category in which the solution folder is contained |
folder.articles | collection of articles | Articles inside the solution folder |
folder.articles_count | number | Count of articles inside the solution folder |
visibility | number |
Solution Articles
Includes placeholders specific to Solution articles:
Placeholder | Return Type | What they mean |
article.title | string | Title of the solution article |
article.thumbs_up | number | No of thumbs ups for a solution article |
article.thumbs_down | number | No of thumbs downs for a solution article |
article.body | html | The body of the solution article including any formatting and images |
article.body_plain | string | The body of the solution article in plain text |
article.modified_on | date/time | The time stamp pointing to when the solution article was last modified |
article.created_on | date/time | The time stamp pointing to when the solution article was originally created |
article.id | number | The Unique ID of the solution article |
article.url | url | The URL pointing to the article |
article.tags | array of objects | The search tags that have been added to the solution article |
article.attachments | attachment | The attachment(s) that are present in the solution article |
article.cloud_files | array of cloud files | The cloud file attachment(s) that are present in the solution article |
article.type | string | The type of the article (Permanent or Workaround) |
article.folder | string | The folder in which the article is contained |
article.category | string | The category in which the solution article is contained |
article.thumbs_up_url | url | The URL which will increase the thumbs up of the article by one. Need to use a data-method=”put” attribute in the link to work. |
article.thumbs_down_url | url | The URL which will increase the thumbs down of the article by one. Need to use a data-method=”put” attribute in the link to work. |
portal.recent_articles | collection of articles | The list of recently added articles from across the portal |
related | collection of articles |
Forums
Includes placeholders you can use to customize your Forums section.
Forum Categories
Placeholder | Return Type | What they mean |
forum_category.name | string | Returns the name of forum categories |
forum_category.description | string | Returns the description of forum categories |
forum_category.id | number | Unique ID of the forum category |
forum_category.url | url | URL pointing to a forum category |
forum_category.forums | collection of forums | Forums in the category based on visibility |
forum_category.forums_count | forum | Forums count in the category based on visibility |
Specific Forum
Placeholder | Return Type | What they mean |
forum.name | string | Name of the forum |
forum.description | string | Description of the forum |
forum.url | url | URL pointing to the forum |
forum.id | number | Unique ID of the forum |
forum.type_name | string | Type of the forum (announcement, ideas, problems, questions) |
filter.list | ||
forum.current_topic_filter | string | Currently selected forum filter. Will work only in the respective filters page |
forum.allowed_filters | Will return a hash with the below details
| |
forum.forum_category | forum category | Category in which the forum is present |
forum.topics | list of topics | List of topics in the forum |
forum.topics_count | number | Count of all topics in the forum |
forum.planned_topics | topic | Planned topics that are available only for the "ideas" forum |
forum.popular_topics | topic | List of popular topics |
forum.answered_topics | topic | List of answered topics |
forum.unanswered_topics | topic | List of unanswered topics |
forum.solved_topics | topic | List of solved |
forum.unsolved_topics | topic | List of unsolved topics |
forum.implemented_topics | topic | Implemented topics that are available only for a ideas forum |
forum.nottaken_topics | topic | Not taken topics that are available only for a ideas forum |
forum.inprogress | topic | In progress topics that are available only for a ideas forum |
forum.deferred | topic | Deferred topics that are available only for a ideas forum |
Specific Topic
Placeholder | Return Type | What they mean |
topic.title | string | Title of the forum topic |
topic.id | number | Unique ID of the forum topic |
topic.stamp | string | Stamp of the forum (planned, inprogress, deferred, implemented, not taken) comes only for forum type as ideas |
topic.user | user | User who created the topic |
topic.created_on | date/time | The timestamp denoting when the topic was created |
topic.votes | number | No. of votes on a forum topic (can be “I like this idea”, “I have this question” or “I have this problem”) |
topic.views | number | No. of views on a forum topic |
merge | boolean | |
topic.locked | boolean | Returns true or false based on whether the topic is locked or not |
topic.sticky | boolean | Returns true or false based on whether the topic is a sticky (that will appear on the top) |
topic.answered | boolean | Returns true or false based on whether the topic has been answered to or not |
topic.has_comments | boolean | Returns true or false, used to check if the topic has any comments or not |
topic.posts | post | List of posts inside the topic |
topic.comment_count | number | Number of comments that have been created under a topic |
topic.first_post | post | The first post in the topic, which was created by the original creator |
topic.last_post | post | The last reply of the topic which is the latest in the list |
topic.url | url | URL to a particular topic in the forum |
topic.forum | forum | The forum in which a topic is contained |
topic.attachments | attachment | The attachments that have been made to a topic |
topic.last_post_url | url | URL to the last reply made to the forum topic |
topic.voted_by_current_user | boolean | Forum topics in which users have voted (can be “I like this idea”, “I have this question” or “I have this problem”) |
topic.like_url | url | The URL used to like a particular topic. Need to use a data-method=”put” attribute in the link to work. |
topic.unlike_url | url | The URL used to unlike a particular topic. Need to use a data-method=”put” attribute in the link to work. |
my_topics | string | List of topics that have been created or currently being followed by the user |
my_topics_count | number | Number of topics that have been created or currently being followed by the user |
Specific Post on the topic
Placeholder | Return Type | What they mean |
post.id | number | Unique ID of the post |
post.body | string | Plain text version of the post |
post.body_html | html | Html version of the post |
post.created_on | date/time | Time stamp referring to when the post was originally created |
post.user | user | Information about the user who created the post |
post.topic | topic | The topic in which the post is contained |
post.answer | boolean | Returns true or false based on whether there can be answers on the post or not |
post.attachments | attachment | The attachment(s) that are available in the post |
post.url | url | The unique URL of the post |
Attachments
You can customize how your pages (and users) access attachments in your solutions and forums. For example, you can create a layout that will automatically show the thumbnail of the first image attachment with the solution’s overview. Any image attachments will automatically create a corresponding thumbnail as well.
Placeholder | Return Type | What they mean |
attachment.url | url | URL to the attachment |
attachment.thumbnail | url | Preview image of the attachment file |
attachment.extension | string | The file extension of the attachment (.doc, .jpg etc) |
attachment.filename | string | The filename of the attachment without the extension |
attachment.size | number | File size of the attachment |
attachment.is_image | boolean | Returns true or false based on whether the attachment is an image or not |
Users
Provides placeholders to define anything related to your users and how they access your portal. Remember, users refer to both Requestors as well as your Customers in Freshdesk.
Placeholder | Return Type | What they mean |
portal.user.name | string | Full Name of the user using the support portal |
portal.user.firstname portal.user.lasttname | string | Returns the first name and last name of the user respectively |
portal.user.email | Email address of the user | |
portal.user.phone | number | Phone number of the user |
portal.user.mobile | number | Mobile Number of the user |
portal.user.job_title | string | Job title of the user |
portal.user.time_zone | string | The time zone that has been configured in the user’s profile |
portal.user.profile_url | url | The URL pointing to the profile of the user |
portal.user.id | number | Unique ID of the user |
portal.user.company_name | string | Company name that has been specified in the user’s profile |
portal.user.is_agent | boolean | Returns true or false based on whether the user is an agent or not |
Using snippets for critical behavior
You can use ready-made snippets in your to enhance your support operations. For example, instead of updating the layout of the new ticket form, you can include the corresponding snippet and improve the behavior.
Portal Wide Snippets
Placeholder | Return Type | What they mean |
snippet new_ticket_form | html | Includes the new ticket form into the page |
snippet new_topic_form | html | Includes the new topic form into the page |
snippet signup_form | html | Includes the signup form into the page |
snippet login_form | html | Placeholder for Language Switcher In the portal, users have the option to switch between the supported languages by using the language switcher. Includes the login form into the page |
snippet forgot_password_form | html | Includes the forgot password form into the page |
snippet search_form | html | Includes the search from into the page |
Topic detail page snippets
Placeholder | Return Type | What they mean |
snippet topic_reply | html | Includes the topic reply form into the page |
snippet topic_vote | html | Includes the voting buttons into the page |
Multilingual Portal
If you have Multilingual Support on the portal, you can use the following additional dynamic placeholders and code snippets for language support.
Placeholder for Language Switcher: {{ portal | language_list }}
Generates the language switcher on the portal.
If your portal is configured to support multiple languages, customers can use the language switcher option on the customer portal. The placeholder will be automatically included with appropriate styles when {{ portal | welcome_navigation }} is already available. If not available, add the code manually for the language switcher.
Note: To ensure that the styles match your brand, it is always recommended to check the changes in draft mode before publishing it.
Placeholder for Dynamic Text: {{ portal.current_language.code }} or {{ portal.current_language.name }}
Use this to translate any hardcoded text on the support portal, such as the page header, title, or footer based on the language selected by the users.
For example, if your portal header text is "Hi, how can we help you?" translated text can be added based on the current portal language selection using {{ portal.current_language.code }} or {{ portal.current_language.name }}.
Here is an example code that needs to be used on your portal customization code:
<h1> {% if portal.current_language.code == "en" %} We are here to help! {% elsif portal.current_language.code == "fr" %} Nous sommes ici pour aider! {% elsif portal.current_language.code == "de" %} Wir sind hier um zu helfen! {% endif %} </h1>
View and use dynamic placeholders
To access and use the placeholders.
- Go to Admin > Portals and click on the Edit icon next to any portal.
- Switch to the Appearance tab. You will see your current live theme and other available themes. Click Edit theme.
- Switch to the Pages tab. You will see the different portal pages and the corresponding CSS code on the code editor.
- To use the placeholders for further customization, click on the Insert placeholder button within the code editor. You can see the different categories of dynamic placeholders.
- Use them to personalize your customer portal. Once you've done so, click Publish.