The related product links merge tag

{related_product_links} prints links to the products associated with a course. It exists so that a no-access message can point at what to buy without hard-coding a URL.

Where it works

In the rich-text fields that a blocked student reads:

  • Course settings → Configuration → Content if no access;
  • the "Lesson not available" texts, at course and lesson level.

The editor states it explicitly on the course field: the variable displays links to associated products, and shortcodes are allowed.

What it produces

A comma-separated list of links, one per product associated with the course, each labelled with the product name and pointing at its product page.

You can enroll here: {related_product_links}

becomes, when two products are associated:

You can enroll here: Starter plan, Full course

with each name linked.

When it prints nothing

If no product is associated with the course, the tag renders as empty text. The rest of your sentence remains, which can read oddly:

You can enroll here: .

So write the message to survive an empty tag:

This course is included with our plans. {related_product_links}
See [all plans](/plans/) or [sign in](/my-account/) if you already have one.

That way the message works whether or not the tag produces anything — which also makes it safe to reuse across courses.

The merge tag is a convenience, not a guarantee. A hand-written link to the product or the plans page:

  • works regardless of what is associated with the course;
  • lets you control the wording of the call to action;
  • survives a product being replaced.

Use both: the tag for accuracy, a written link for reliability.

Shortcodes work too

The same fields run shortcodes, so a message can include a button, a pricing block, a countdown or any page-builder element the site provides.

Two cautions:

  • Keep it light. This message is read by someone who is one click from leaving; a full landing page inside it is not the right tool. Link to the landing page instead.
  • Test it as a student. A shortcode that renders differently for signed-out visitors is easy to miss.

Where the tag does not work

It is not a general-purpose tag. It is replaced only in the no-access texts described above — not in the course description, not in lesson content, not in settings fields.

Verify

  1. Put the tag in the course's Content if no access.
  2. Sign in as a student without access and open the course.
  3. Confirm the product links render and open the right products.
  4. Confirm the surrounding sentence reads correctly.
  5. Try the same message on a course with no associated product and confirm it still reads well.