Hello, all! Apologies if this is in the wrong category. Been working with Twine for a while but new to the forum. I am seeking advice on the best way to open an external URL in a new tab/window. My stories are built in Twine 2.0.11 standalone and Harlowe 1.2.2.
(1) I know that I can use something like
(2) I also know that I can use standard HTML
Any help/advice along these lines would be appreciated. My “stories” are actually interactive lessons for college students, delivered inside a closed system where using the standard browser back button is problematic, so sending the link into a new tab/window is pretty important to avoid disrupting the user experience.
(Also: why does the forum software add unwanted semicolons near quotation marks?)
(1) I know that I can use something like
(link: 'foo')[(open-url: 'http://foo.bar')]to accomplish this. I was having some problems with unexpected text showing up in the passage, but on another thread greyelf showed me how to deal with that. (Thanks!)
(2) I also know that I can use standard HTML
<a href='http://foo.bar' target='_blank'>foo</a>markup to do this, but I don’t know how to pass story variables into the URL or even if that’s possible. If I understand correctly, I cannot just use
<a href=$foo>or something along those lines because Harlowe doesn’t parse the text inside HTML tags as Harlowe/Twine markup. (Is that right?)
Any help/advice along these lines would be appreciated. My “stories” are actually interactive lessons for college students, delivered inside a closed system where using the standard browser back button is problematic, so sending the link into a new tab/window is pretty important to avoid disrupting the user experience.
(Also: why does the forum software add unwanted semicolons near quotation marks?)