Message Boards Message Boards

GROUPS:

Open links from cloud notebook in the same tab

Posted 4 months ago
625 Views
|
4 Replies
|
5 Total Likes
|

@Jan Poeschko gave a talk at WTC 2018 on developing a blog in the Wolfram Cloud using notebooks. In the presentation he's able to navigate between different pages (notebooks) without leaving the tab.

I've deployed his same code but every time I click a link it opens a new tab. Can someone tell me if this is a browser setting, Wolfram Cloud setting, or notebook/deployment expression?

Thanks, Eric

4 Replies

Hi Eric,

did you have a look at his slides?

https://www.wolfram.com/events/technology-conference/2018/presentations/#friday

and in particular this file?

Cheers,

Marco

Those are the notebooks I ran. When I was getting new tabs popping up and Jan didn't in his video, I decided to post here. I was hoping @Jan Poeschko might see this post and be able to explain (tagging him again because the original tag was an edit and I'm not sure he'd get notified). Anyone else know why this happens?

The default behavior for hyperlinks is to open in the same tab if they point to the same origin (protocol + subdomain + domain) as the current notebook URL, and open a new tab otherwise. Compare e.g.

Hyperlink["Wolfram", "https://wolfram.com"]

to

Hyperlink["Another cloud object", "https://www.wolframcloud.com/objects/jpoeschko/HelloWorld.nb"]

– the latter will open in the same tab if you're viewing the notebook at www.wolframcloud.com ("the deployed view") as well (whereas it will open in a new tab if you're looking at the notebook at develop.wolframcloud.com).

If you want lower-level control of this, you can use NotebookLocate and the option "OpenInNewWindow" (unfortunately undocumented, as of now):

Button["Open in same tab", NotebookLocate[{URL["https://wolfram.com"],Null}, "OpenInNewWindow"->False]]

will always open in the same tab, regardless of the relation between source and target origin. You can also specify True to force a new tab.

There are two changes in the pipeline that will make this more straight-forward:

  • We'll deprecate the various product-specific subdomains so everything will be at www.wolframcloud.com (/obj for the deployed view, /env for the "environment" / edit view), as part of a bigger effort to simplify our product/license offering (coming soon). Of course, the old URLs will keep working as a courtesy. Once you're always working under www.wolframcloud.com, it makes the hyperlink behavior more predictable.
  • We're working on revamping the hyperlink dialog and related functionality under the hood (also on desktop), so there will be more convenient control of whether to open a new tab or not. This is a bit further out.

Hope this helps. Let me know if you have any further questions.

Thanks Jan,

I’ll try the lower level control option. Every notebook opens in a new tab for me. I thought that was by design. I couldn’t reproduce the behavior in your talk, so I’m not sure what’s different (I suspect it has to do with the product-specific subdomains). Anyway, I’ll add to this thread if I run into anymore problems. Thanks again

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract