Skip to content
Help Center
Submit a request Sign in


Supportbench Liquid tags: URLs, attachments, avatars and year

Supportbench’s custom Liquid tags connect portal templates with a small set of built-in presentation helpers. They can render the current URL in an encoded form, place the supported upload control in its existing form, or show the current year. Use them for the specific purpose they support; they are not general API calls or a way to build a new form from scratch.

At a glance

For: portal administrators and designers working with support operations. Applies to: Supportbench Core.

Start here: Settings → Customer Portal → select the portal → Page templates

What this object gives you  ·  Choose the correct page and customer context  ·  Supported values and how to use them  ·  Example: add a footer year without hard-coding it  ·  Change an uploader’s surrounding presentation safely  ·  Distinguish URL encoding, HTML escaping and ordinary links  ·  Make and verify the change  ·  Common problems and recovery  ·  Keep the portal useful over time

What this object gives you

A tag uses {% tag_name %}, while a value or filter expression uses {{ value | filter }}. The custom tags listed here take no arguments. In particular, url is not a function accepting an arbitrary destination, and uploader does not create the entire submission workflow.

The current tags are url, url_encoded, uploader, avatar_uploader and year. Keep the exact underscores and tag delimiters.

Choose the correct page and customer context

Edit the existing portal page that owns the relevant control. An attachment uploader belongs in its supported form context, and the avatar uploader belongs in the profile context. Do not paste them into an arbitrary article body and expect a new authenticated upload workflow.

Open the intended portal in Settings → Customer Portal, then choose Page templates. You need permission to administer communities or the applicable portal-edit override. Work on the existing page for this task; adding an object name to a different page does not make its records available. Keep existing forms, input names, navigation and scripts intact.

Liquid is a presentation language. Expressions inside {{ ... }} print values; statements inside {% ... %} control a loop or condition. A collection must be looped through before reading an individual row. These examples are display fragments to adapt within a working template, not replacement page templates.

Supported values and how to use them

MemberMeaning and operational use
{% url %}Encodes the current page URL. It does not return an arbitrary destination and should not be used directly as a normal href without understanding the surrounding URL contract.
{% url_encoded %}Uses the compatibility transformation replacing dot, slash and backslash characters with plus signs before encoding the current URL. Preserve it only where the surrounding feature expects that representation.
{% uploader %}Renders the supported attachment uploader inside the existing form context. Retain the form, callbacks and submission behavior.
{% avatar_uploader %}Renders the profile-avatar upload control in the applicable profile context.
{% year %}Renders the current UTC year, useful in a footer.

Example: add a footer year without hard-coding it

<footer>
 <p>© {% year %} Example Support Team</p>
</footer>

Replace the illustrative organization name with your own approved footer text. The year follows UTC, which matters around the year boundary if your local timezone differs. This tag changes display only; it does not update legal terms or a policy review date.

Change an uploader’s surrounding presentation safely

  1. Open the existing working case, discussion or profile page containing the uploader. Identify the complete form and its existing upload control.
  2. Keep the uploader tag, form identifiers, hidden inputs and script hooks in place. Change only the surrounding explanatory text or layout required for the customer task.
  3. Add a clear instruction such as what diagnostic file the support team needs. Use the actual product’s accepted-file and size behavior; do not invent an upload limit in the text.
  4. Preview the layout, then use an authorized controlled customer test after publication to upload a suitable non-private test file and complete the normal submission.
  5. Verify the saved result and attachment access. A visible file-picker control alone does not prove that upload and submission succeeded.

Distinguish URL encoding, HTML escaping and ordinary links

URL encoding prepares a value for a particular URL representation. HTML escaping protects a value when outputting it inside HTML. They solve different problems. An encoded whole current URL is not automatically a valid relative link to the page.

For ordinary article, container or case links, use the supported route pattern or a URL supplied by the page object and escape the HTML attribute. The url_encode filter applied to a string is also distinct from the url_encoded custom tag. Current standard-filter behavior must not be described as the tag’s compatibility punctuation transformation.

Make and verify the change

  1. Write down the customer task this change should improve. For example, make the correct request or relevant knowledge easier to find. Decide what should appear when there is no data.
  2. Copy the current template into your approved change record before editing. Add the fragment in the correct page context without removing functional controls.
  3. Choose Save Changes to save the draft, then Design to preview it. Check a populated example and an empty or signed-out example as applicable.
  4. Inspect desktop and narrow-screen layouts. Test long customer names, long titles, missing optional values, readable links and keyboard navigation.
  5. Use Review changes → Publish when the draft is ready. A saved draft does not update the live visitor page.
  6. Open the actual portal as an intended customer and follow the full task. Verify another relevant role or customer scope where visibility differs. Record the account, page, role and outcome with the change.

Preview is only part of the check

Designer examples use synthetic data. They can show layout and syntax problems, but do not prove that a real customer has access to a record. Keep portal access rules and the actual customer test separate from visual preview.

Common problems and recovery

ProblemWhat to check
A URL tag takes a destination argument but does not workThese tags take no arguments and operate on the current URL. Use the appropriate page-supplied link or supported route.
A link contains an encoded entire URL where a route was expectedReview the destination’s contract. Do not paste the encoded current-URL tag directly into ordinary navigation.
The upload control appears but nothing is savedRestore the required form and script context and verify the full submit flow. The tag alone is not a complete workflow.
An avatar uploader appears on the wrong pageKeep it in the supported profile context and preserve the native profile save behavior.
The template renders in preview but the live page has not changedConfirm that you published the reviewed draft for the correct portal, page and language. Reopen the live page.
A customer sees fewer records than an agentCheck the customer’s portal role, company/contact relationship and the record’s audience. Do not attempt to broaden access by changing a Liquid loop.
A layout change breaks a form or navigationCompare the changed template with the saved working version. Restore missing form IDs, inputs, URL patterns or callbacks before publishing the corrected draft.

Keep the portal useful over time

Use customization to make the required customer action clearer, such as explaining which diagnostic file helps the team investigate. Preserve the proven upload and authentication flow instead of rebuilding it through presentation tags.

Use clear labels and meaningful empty states. Do not display a raw ID when a customer needs a descriptive name, and do not describe an absent value as a service failure. After changes to portal roles, topic placement, custom fields or language coverage, revisit the relevant customer examples. A successful render alone does not establish that the instructions, links and customer visibility are still correct.

Was this article helpful?