Wiki external links with target _blank?

4806766, modified 15 Years ago. Junior Member Posts: 29 Join Date: 3/30/10 Recent Posts
How do I define Links in a Wiki so it opens them in a new window?? The normal creole syntax does not have something like target=_blank.

However I saw, that in the Liferay WIKI all external links open new windows. How is this done??

Many thanks for your hints.

Thomas
thumbnail
4753419, modified 15 Years ago. Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
You can just change the "Format" to HTML and select "Source" to enter HTML tags.
4806766, modified 15 Years ago. Junior Member Posts: 29 Join Date: 3/30/10 Recent Posts
Hmm, if I look at the HTML Code in a Liferay WIKI they use a style called 'external', but I don't know how to add styles in creole either. To switch between Creole and HTML seems to be complicated. It looks like Creole does not support a target in a link tag. Wikipedia (Mediawiki) does not suport that either. I just wondered how Liferay implemented it.

Tom
thumbnail
4753419, modified 15 Years ago. Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
http://www.liferay.com/ja/community/wiki/-/wiki/Main/Wiki+Portlet

Search for "External Links" in the above page.
4806766, modified 15 Years ago. Junior Member Posts: 29 Join Date: 3/30/10 Recent Posts
I was reading this article already. But it does not seem to work (anymore). I use Version 6.0.5 and I have only the choice of HTML or CREOLE 1.0 type formats. I don't know how to get in the 'Enhanced Classic Wiki mode'emoticon

However this Wiki page contains lots of external links and they seem to do the formatting with css like so:

<a class="external" href="http://www.wikicreole.org/wiki/Creole1.0">Creole 1.0 spec</a>


The code shows, that there is a class "external" used to format the <a> tag. However as far as I know it is not possible to set a target=_blank with CSS. So I still don't know how its done!

I was also looking at the documentation of jspwiki but could not find anything helping me any further.

Thomas
thumbnail
4753419, modified 15 Years ago. Liferay Legend Posts: 7942 Join Date: 3/24/10 Recent Posts
Ah, it's may be working on Liferay.com wiki because I think Liferay.com is still on Liferay 5. :-)
4399377, modified 15 Years ago. New Member Posts: 22 Join Date: 12/23/09 Recent Posts
I had the same need to create an external link on a wiki page that opens in a new window.

I went on the this page : http://www.jspwiki.org/wiki/JSPWikiFAQ

and there they give the right syntax, which is : [Like this|http://google.com|target='_blank']
4806766, modified 15 Years ago. Junior Member Posts: 29 Join Date: 3/30/10 Recent Posts
Hi Patrice,

Hey, thanks a lot for that info! It works and rocksemoticon! This is JspWiki syntax and it works with Liferay 6.0.5 as long as you follow the exact syntax. So _blank needs to be in single quotes, double quotes as usually in HTML does not work.

Great! Thanks again.

Thomas
Taruchit Goyal, modified 8 Years ago. Junior Member Posts: 60 Join Date: 3/16/18 Recent Posts
Hi
I have Liferay 7.
I tried [Like this|http://google.com|target='_blank'], but it does not work.
http://www.jspwiki.org/wiki/JSPWikiFAQ is not a valid url.

Can you share the exact example which you implemented or the source where you got the syntax?

Thanks
Taruchit