Relative links being autocorrected

Jump to solution
DDFletch
Community Explorer

We serve up our content to schools all around the nation.  I like having buttons on the home page of each course, with a button that takes you directly to the first assignment.  It's a simple way to get started.  

However, when I try to add a relative link it autocorrects the link back to the full URL.

I need the button to be relative because there are 100s of schools using their own courses within our canvas instance.  If it is hard coded in with the URL then it takes the user back to my blueprint course, when where I want them is in their own course.

For instance, the blue print course link might be https://sneakonthelot.instructure.com/courses/129

The user link for the same page might be https://sneakonthelot.instructure.com/courses/318

I need the button to have a link that just adds /pages/syllabus to the link.  So I add the following code to the button.

<p><a class="blue-button" title="Assignment 1" href="/pages/syllabus">Let's Get Started!</a></p>

Problem is, when I save it, Canvas autocorrects the relative link to the full address:

https://sneakonthelot.instructure.com/pages/syllabus

This cuts out the course ID that the user needs and takes them to a page that doesn't exist.

So what address to I put on this button to take the user to a page within their respective courses?

 

0 Likes
1 Solution
Chris_Hofer
Community Coach
Community Coach

Hi @DDFletch ...

I'm not sure that I'm completely following what you are asking, but I wonder if you are using the options within the RCE (Rich Content Editor) to make a hyperlink on text that just points to the Syllabus page?  Would that work for your needs?  Check out this Guide:

How do I create hyperlinks to course or group cont... - Instructure Community (canvaslms.com)

About half-way down the Guide that I linked to above, there is a section on "Insert Course Navigation Link", and you can see that there is an option to link to the course "Syllabus" page of the course you're in.

What are your thoughts about using that instead of what you've been trying?

View solution in original post