diff -ur webmenu-target.orig/data/TWiki/WebMenu.txt webmenu-target/data/TWiki/WebMenu.txt --- webmenu-target.orig/data/TWiki/WebMenu.txt Wed Apr 21 12:06:56 2004 +++ webmenu-target/data/TWiki/WebMenu.txt Wed Apr 21 12:12:38 2004 @@ -14,7 +14,7 @@ | %WEB{name="..." home="<Web>¦<Web>.<Topic>" [expand="always¦never"]}% | Entry for a Web heading | | %ITEM{name="..." [topic="..."]}% | Define a Web topic item | -| %LINK{name="..." [url="..."]}% | Define generic entry | +| %LINK{name="..." [url="..."] [window="new"]}% | Define generic entry | | %DEFAULTITEMS% | Default Web topic items | ---++ Example diff -ur webmenu-target.orig/data/TWiki/WebMenuFormat.txt webmenu-target/data/TWiki/WebMenuFormat.txt --- webmenu-target.orig/data/TWiki/WebMenuFormat.txt Wed Apr 21 12:06:46 2004 +++ webmenu-target/data/TWiki/WebMenuFormat.txt Wed Apr 21 12:12:15 2004 @@ -14,7 +14,7 @@ | %WEB{name="..." home="..." [expand="always or never"]}% | entry for Web | | %ITEM{name="..." [topic="..."]}% | topic in Web, any number of these after %WEB% | -| %LINK{name="..." [url="..."]}% | Genric entry, an URL. | +| %LINK{name="..." [url="..."] [window="new"]}% | Define generic entry | | %DEFAULTITEMS% | default topics defined by using SET DEFAULTITEMS | * __Only put one WebMenu command per line__. @@ -25,7 +25,7 @@ * The ITEM command creates a sub-level item. Only two levels exist in the WebMenu, top-level and sub-top-level. The topic option denotes the actual web topic, with respect to the top-level web. The name option can be used to reference a topic with a different name. E.g., ChangeLog instead of WebChanges, for instance.
__Example:__ * %ITEM{name="WebPreferences"}% — A sub-level item called WebPreferences which links to the same topic. - * The LINK entry is a generic sub-level item. If you do not understand any of the others this one is for you. This can completely replace the ITEM above, if you like. + * The LINK entry is a generic sub-level item. If you do not understand any of the others this one is for you. This can completely replace the ITEM above, if you like. The window option is used to open the link in a new browser window. * The DEFAULTITEMS is a set of sub-level items that are common for many webs. The setting is a comma separated list of items. Do _NOT_ put any spaces between the comma and the following item!
__Example:__ * Set DEFAULTITEMS = %ITEM{name="Preferences" topic="WebPreferences"}%,%ITEM{name="ChangeLog" topic="WebChanges"}%,%ITEM{name="WebNotify"}%,%ITEM{name="WebStatistics"}% diff -ur webmenu-target.orig/lib/TWiki/Plugins/GnuSkinPlugin.pm webmenu-target/lib/TWiki/Plugins/GnuSkinPlugin.pm --- webmenu-target.orig/lib/TWiki/Plugins/GnuSkinPlugin.pm Tue Feb 25 08:33:30 2003 +++ webmenu-target/lib/TWiki/Plugins/GnuSkinPlugin.pm Wed Apr 21 12:02:16 2004 @@ -235,13 +235,18 @@ my $args = $1; my $name = TWiki::Func::extractNameValuePair ($args, "name"); my $url = TWiki::Func::extractNameValuePair ($args, "url"); + my $target = TWiki::Func::extractNameValuePair ($args, "window"); if (!$name) { $name = $url; } + if ($target = "new") + { + $target = "target=\"_blank\""; + } if ($visible) { - $res .= "$name
\n"; + $res .= "$name
\n"; } } }