cancel
Showing results for 
Search instead for 
Did you mean: 
sdunbar1
Community Member

How can I make a file open in a new window?

Jump to solution

As you can probably guess I am new to Canvas.  I just can't seem to find where, when working in a module, I can set a link to open in a new window.  I would like to know how to do this with links and files.

1 Solution

Accepted Solutions
snufer
Community Advocate
Community Advocate

The the modules page is a File then it can't be opened in a new tab, but the External URL page does have that option:

2016-09-26_10-47-1.png

With that said, I support the use of content pages to display files and using the html to have them open in new windows.  I typically create a files page in my Course Home module.

2016-09-27_11-47-06.png

View solution in original post

6 Replies
ajeffery
Community Member

Did you find the answer to this question? If not, I'm happy to help

don_bryn
Surveyor

When you add a link to a page, assignment, question, or anywhere you use the rich text editor, the only way I know to make it open in a new window is this:

add the the link and make it look the way you want. Then click on html editor. Find the link you just created and look for the target="" property. Add the word 'blank' between the quotation marks and save the page. It will look, like this:  target="blank".

kblack
Community Member

I would like to add a slight correction to Don's good advice, and that is that the target= property that Don mentions should actually be written with an underscore preceding the "blank".  So it should look like this:  target="_blank"  .  Omitting the underscore will now allow it to work properly.  (At least, it didn't when I tried it just now to be sure.)

Secondly, re-reading your question, it appears that you asked specifically about working in Modules.  So perhaps  @ajeffery ​, if you have an idea you may want to offer it?  Unless you have a trick up your sleeve, adding a File or External URL when using Modules does not allow for any editing and you're stuck with whatever behavior occurs.  (My own experience has been that most External URL Modules will open in a separate tab.)  That said, I personally am not a fan of how either of these work in Modules.  I recommend to my faculty to instead create a Page in a Module, and then link to your web sites or files from on the page.  (And it's on a Page that Don's advice to use the target= attribute will work while editing in HTML view.)

Funny, I've always just typed blank, but maybe canvas fixes it on submit.   Ken is right that technically it needs an underscore first.

snufer
Community Advocate
Community Advocate

The the modules page is a File then it can't be opened in a new tab, but the External URL page does have that option:

2016-09-26_10-47-1.png

With that said, I support the use of content pages to display files and using the html to have them open in new windows.  I typically create a files page in my Course Home module.

2016-09-27_11-47-06.png

View solution in original post

kblack
Community Member

My mistake!  Sean is correct, of course--you definitely have that option for External URLs.  But yes, I still do not like the way they are implemented!  You should follow Sean's example and just link to things on a page.