Skip to main content

Create generic links to Steps or Blocks that work in any Cohort

A pro-tip for scenarios where it's helpful to link to a particular Step (or Block within a Step) for members of many different Cohorts.

Paul Johnson avatar
Written by Paul Johnson
Updated over a week ago

This Pro Tip is useful when you...

  1. Are designing a Path that has (or will have) multiple active Cohorts.

  2. Want to include a hyperlink somewhere in the Path content that navigates a learner to a different Step or Block in the Path than the one they're on (for example, a link to review a previous assessment or project, a link to an upcoming lesson, or a past event recording).

A standard link (e.g., the one you get from copying the URL in your browser) won't work in this case because each Cohort has a unique URL for every Step within it that is different than the URL for other Cohort Paths. Enter "generic links":

How to use a generic link

You can add links within your Path content that go to "the same" Step or Block no matter which Cohort someone is in. A generic link looks different than a full URL:

/library/intro-to-pathwright-17714/_/path/step/274764410/

Notice that:

  • The URL is relative, meaning it does not start with "https://" or your domain (e.g., the entire first part of a URL like "https://school.pathwright.com/" is excluded)

  • The cohort ID is replaced with the "_" placeholder.

How to create a generic link to a particular step

To get a generic link to a step, follow these steps:

  1. Copy the full URL of the Step or Block you'd like to link to generically. (Here's how to copy the URL of a Block.) For example, a full Step URL looks like this:

    https://paths.pathwright.com/library/intro-to-pathwright-17714/41428/path/step/274764410/
  2. Remove the first part of the URL (everything before "/library/..." Now, our example URL looks like this:

    /library/intro-to-pathwright-17714/41428/path/step/274764410/
  3. Finally, replace the numeric ID after the Path title part of the URL and before "/path/" with an underscore ("_"). Now we have a generic link and our example URL looks like this:

    /library/intro-to-pathwright-17714/_/path/step/274764410/

Now that we have a properly formatted generic link, you can paste it into the link field for any text you select within a Block or use it in the "Button Block" to create a button link back to the Step.

​

How to create a generic link to a particular block

To link to a particular block in a different step than the one you are on, follow the same process as above:

  1. Copy the full URL of the Block you'd like to link to generically. (Here's how to copy the URL of a Block.) For example, a full Block URL looks like this:

    https://paths.pathwright.com/library/intro-to-pathwright-17714/100762/path/step/274764410/#block--NfW3Ia-mGY7LskbSxqq
  2. Remove the first part of the URL (everything before "/library/..."):

    /library/intro-to-pathwright-17714/100762/path/step/274764410/#block--NfW3Ia-mGY7LskbSxqq
  3. Finally, replace the numeric ID after the Path title part of the URL and before "/path/" with an underscore ("_"):

    /library/intro-to-pathwright-17714/_/path/step/274764410/#block--NfW3Ia-mGY7LskbSxqq

To create a generic link to a Block within the same step, you only need the hashtag of the block. For example, here is a full URL of a Block link:

https://paths.pathwright.com/library/intro-to-pathwright-17714/100762/path/step/274764410/#block--NfW3Ia-mGY7LskbSxqq

Remove everything but the hashtag of the Block:

#block--NfW3Ia-mGY7LskbSxqq

Important Note: Generic links only work when used inside a step. They currently do not work outside of a Path (for example, sending by email or in Slack). They also do not work in discussion prompts or posts.


​


​

Did this answer your question?