[pmwiki-users] [confluence / pmwiki ] {newwindow} versus %newwin%

Stéphane Heckel hsteph at club-internet.fr
Tue Apr 24 17:27:03 CDT 2007


Bonsoir,

The regular confluence syntax to open a link in a new window is :
{newwindow:caption|title|width|height|scrollbars}url{newwindow}
described here 
http://confluence.atlassian.com/display/CONFEXT/New+Window+User+Macro

ie :
{newwindow:Join the LinkedIn Network||||}http://www.linkedin.com{newwindow}

Remark : I never use title, width, height or scrollbars, ...

In PmWiki, this would be:
%newwin% [[http://www.linkedin.com | Join the LinkedIn Network]]

The first tentative to convert {newwindow} to %newwin% using Markup() gives 
this :

## {newwindow:}
Markup('{newwindow}', '<links',
'/\\{newwindow:[^}]*\\}(.*?)\\{newwindow\\}/',
'%newwin%[[$1]]%%');

However, this version does not handle the "caption", ...
How do I extract both "caption" and "url" from {newwindow:Join the LinkedIn 
Network||||}http://www.linkedin.com{newwindow} to generate the correct 
Markup() ?

Thanks for your help.

SH
(lost on this one :) 






More information about the pmwiki-users mailing list