Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents
typeflat

Introduced feature: Custom text variables

Since earlier versions, Refined for Jira has included text variables making
Info

This feature is available in version 3.2 and up.

Text variables make it possible for the text on the sites and pages to adapt to the context or user watching them. In 3.2 we’re raising the stakes by introducing custom text variablesAside from the default text variables, you can add custom ones yourself.

Text variable

A text variable is a placeholder that picks up its surroundings. In this example below the Primary text field is set to $categoryname Center and when the layout is saved this first part is replaced with the name of the current category.

The text variables are set by Refined, and cannot be changed.

Custom text variable

A custom text is one that you set up in your system. This means that anything can be added and dynamically show up on your layouts, categories, modules, announcement banners, and more. To sum it up, anywhere you as an admin can input text that is shown to users, you can place a custom text variable.

Example

As the Primary text for the Search Highlight, we have $welcometo$ the Hub, this means that when this layout is displayed, the full Primary text will be the content of $welcometo$ and “the Hub”.

The content of any custom text variable is set by an admin in Refined Administration > Languages > Dictionary.

Info

This feature is tightly working with the Language feature that you can find here: Tutorial: Working with portal languages and translations (from 3.2) .

When to use Text Variables

We recommend using text variables in the following situations:

  • when you want one place to update wordings and phrases used in many places

  • when you are running a site that has several languages in use

Step by step

Let’s walk through what you need to do.

Rw ui steps macro
Rw step

Make a plan

To make the most of this feature, think about what content you want to add. For instance, if you want to have the main message of all category landing pages to be “Welcome to CATEGORY”, make this clear in the name of the text variable, or if you want the categories themselves to be contained within a text variable.

Having a plan for your variables will help you know what they are used for.

Context

Text variable name

Default value

Category name

$cat_help-and-info§

Help & info

Category name

$cat_HR-service-desk$

HR Service Desk

Message

$message-welcome-to$

Welcome to

Message

$message-search$

Search

Announcement

$announcement-maintenance$

We have a scheduled maintenance on:

Rw step

Enter your variables values

Second step is to enter the variables into Refined.

Go to: Refined Administration > Languages > Dictionary.

Add in your variable name, the $ are automatically added, and your default value.

Rw step

Apply your variables

Your new variables can be enterer into every place that the admin can enter text: announcement banners, categories, names, layouts, modules, etc.

Rw step

Review the results

In this final picture, we have the utilised the custom variables to display text. This means that you can reuse values over your site, and have one place where you make updates.

Languages

Perhaps you’ve noticed in some of the screenshots that there is an option to add in languages - yes there is! This newly introduced feature (version 3.2) allows you to display a language switcher on your site, and tailor what the user sees.

A tutorial and walkthrough can be found here: Tutorial: Working with portal languages and translations (from 3.2)