Topics Map > D2L Brightspace > Service Support
Topics Map > D2L Brightspace > Content and File Management

D2L - Using Replace Strings

This document describes replacement strings that are available in D2L and where they are used.

Replace strings are variable names enclosed in curly braces {} that are automatically replaced by the corresponding variable values.   For example, if you enter the text {OrgUnitName} into the HTML Editor in Content, the course name will appear in its place when viewing the topic.

Replace strings are used in all tools that use the HTML editor.  However, special rules apply to how they are interpreted:

  1. When composing a topic in Content tool, replace strings are evaluated only once when the Content topic is first saved. Replacement strings are permanently replaced with their result. For example, if you enter {OrgUnitName} into a Content topic in course 'A' and later copy that Content topic into course 'B', the name of course 'A' course will display in the Content topic in course 'B'.  
    • This does not apply for Content links where replacement strings are used to craft QuickLinks that are used as Content topics.
  2. For all other tools, the replacement string is processed every time the tool is viewed. For example, if you enter {OrgUnitName} into a News item in course 'A' and later copy that News item into course 'B', the name of course 'B' will display in the News item in course 'B'. 
  3. Not all replace strings work in all tools.

For example, if the text {FirstName} is in the code of a News item, users in that course will see their first name in the News item.

This table lists the most applicable replacement strings for use in D2L.

List of Common Replacement Strings
Replacement String Description Usage Restrictions
{OrgId} OU# of UW-Milwaukee's D2L site None
{OrgName} The name of UW-Milwaukee's D2L site ("UW-Milwaukee') None
{OrgUnitId} OU# of the course None
{OrgUnitName} Name of the course as set in Course Offering Information None
{OrgUnitCode} Course Offering Code as set in Course Offering Information, and as viewable in My Courses None
{OrgUnitPath} Path to files for the course. None
{UserName} A participant's UWM ePantherID or special access account username. Not usable when composing HTML files in Content.
{FirstName} First name of the user. Not usable when composing HTML files in Content.
{LastName} Last name of the user. Not usable when composing HTML files in Content.
{ExternalEmail} Participant's UWM Eamil address, or "home" address for special access accounts. Not usable when composing HTML files in Content.

Additional codes are available to indicate role, and unique user IDs (but not UWM ID numbers). Contact the Center for Excellence in Teaching and Learning if you have a technical use for this information.




Keywords:brightspace learn@uw learnuw d2l desire2learn replace strings display variable curly brace value no longer available external email known issue   Doc ID:76058
Owner:David D.Group:UW-Milwaukee Center for Excellence in Teaching and Learning
Created:2017-08-24 15:09 CSTUpdated:2017-08-24 15:31 CST
Sites:UW-Milwaukee Center for Excellence in Teaching and Learning
Feedback:  0   0