version=pmwiki-2.2.16 ordered=1 urlencoded=1 agent=Mozilla/5.0 (Windows; U; Windows NT 5.1; nl; rv:1.9.2.3) Gecko/20100401 Firefox/3.6.3 ( .NET CLR 3.5.30729) author=SchreyP charset=ISO-8859-1 csum=question of stan moved to Links-Talk host=91.177.148.41 name=PmWiki.Links rev=156 targets=PmWiki.WikiSandbox,PmWiki.BasicEditing,Main.WikiSandbox,Main.HomePage,PmWiki.WikiWikiWeb,PmWiki.Installation,PmWiki.WikiWord,PmWiki.NonexistentPages,PmWiki.CreatingNewPages,PmWiki.WikiGroup,PmWiki.Categories,PmWiki.InterMap,PmWiki.Robots,Cookbook.PopupWindow,Cookbook.DeObMail,Cookbook.AddUrlSchemes,PmWiki.PageLists,PmWiki.LinkSchemes,Cookbook.ExternalLinks,PmWiki.Images text=(:Summary:Multiple mechanisms for creating links:)%0a(:Audience: authors (basic) :)%0aA key feature of [[wiki(WikiWeb)]]-based systems is the ease of creating %25newwin%25[[Wikipedia:Hyperlink|hyper links]]%25%25 (or short '''links''') in the text of a document. %0aPmWiki provides multiple mechanisms for creating such links.%0a%0a!! [[#links]]Links to other pages in the wiki%0a%0aTo create a link to another page, simply enclose the name of the page inside double square brackets, as in [@[[wiki sandbox]]@] or [@[[installation]]@]. This results in links to [[wiki sandbox]] and [[installation]], respectively.%0a%0aPmWiki creates a link by using the text inside the double brackets. It does this by removing spaces between words, and automatically capitalizing the first letter of each word following spaces or other punctuation (like ~). Thus [@[[Wiki Sandbox]]@], [@[[wiki sandbox]]@], and [@[[WikiSandbox]]@] all display differently but create the same link to the page titled [@WikiSandbox@].%0aOr in other words, PmWiki will automatically create the "link path name" using the page name in ''CamelCase'', but the "link text" will display in the format you have entered it.%0a%0aSome PmWiki sites (default not) will recognize words written in CamelCase, a [[WikiWord]], automatically as a link to a page of the same name.%0a%0a!!! [[#othertext]]With different link text%0a%0aThere are three ways to get a different link text:%0a%0a#'''Hide link text'''. Link text in (parentheses) will not be not displayed, so that [@[[(wiki) sandbox]]@] links to ''[=WikiSandbox=]'' but displays as [[(wiki) sandbox]].%0a%0a#'''Change link text'''. You can specify another link text after a vertical brace, as in [@[[WikiSandbox | a play area]]@], or you can use an arrow ([@->@]) to reverse the order of the link text and the target, as in [@[[a play area -> WikiSandbox]]@]. Both links displays as [[a play area -> WikiSandbox]].%0a%0a#'''Show page title instead of page name'''. The use of special characters in the page name is not a problem for PmWiki, but sometimes the character set is different between the server computer (that runs PmWiki) and the client computer that is used to read your wiki. Especially the UTF-8 character set gives sometimes problems. So it's better to use only ASCII characters in the page name, and to have the localized name in a [=(:title PageTitleName:)=] directive within the page. Now the page title can be shown instead of the page name, with the [@[[PageName|+]]@] markup, e.g. page [@BasicEditing@] contains the directive [=(:title=] {BasicEditing$Title}:) with the result that a link written as [@[[BasicEditing|+]]@] will display as [[BasicEditing|+]].\\%0aSince PmWiki version 2.2.14 this works also for those technical pages that have an entry in the XLPage, without the need to add the [=(:title PageTitleName:)=] directive within that page (for more details see [[(http://www.pmwiki.org/wiki/)Localization.Localization]]).%0a%0aOn top of above ways, a suffix can be added to the end of a link, which becomes part of the link text but not of the target page name.\\%0a'''Note:''' This feature does currently not work with the [@[[PageName|+]]@] markup.%0a%0a[[#markupheaders]]%0a(:table class='markup horiz' align='center':)%0a(:cellnr class='markup1':)%0a[-'''What to type'''-]%0a(:cell class='markup2':)%0a[-'''What it looks like'''-]%0a(:tableend:)%0a[[#markupheadersend]]%0a%0a(:markup class=horiz:)%0a[[(wiki) sandbox]],%0a[[(wiki) sandbox]]es\\%0a[[WikiSandbox|wiki sandbox]],%0a[[WikiSandbox|wiki sandbox]]es\\%0a[[BasicEditing|+]],%0a[[BasicEditing|+]]et%0a(:markupend:)%0a%0a!!! [[#nonexistent]]Links to nonexistent pages%0a%0aLinks to [[nonexistent pages]] are displayed specially, to invite others to create the page.%0aSee [[Creating new pages]] to learn more.%0a%0a!!! [[#othergroup]]Links to pages in other wiki groups%0a%0aLinks as written above are links between pages of the same group. To create a link to a page in another group, add the name of that other group and a dot or slash as prefix to the page name. For example, links to [@Main/WikiSandbox@] could be written as:%0a%0a(:include {$FullName}#markupheaders#markupheadersend:)%0a%0a(:markup class=horiz:)%0a* [[Main.WikiSandbox]]%0a* [[Main/WikiSandbox]]%0a* [[(Main.Wiki)Sandbox]]%0a* [[Main.WikiSandbox | link text]]%0a* [[Main.WikiSandbox | +]]%0a(:markupend:)%0a%0aTo link to the "default home page" of a group, the name of the page can be omitted:%0a%0a(:markup class=horiz:)%0a* [[Main.]]%0a* [[Main/]]%0a(:markupend:)%0a%0aSee [[Wiki Group]] to learn more about PmWiki groups.%0a%0a!!! [[#linkshortcuts]]Link shortcuts%0a%0a'''[@[[PageName|#]]@]''' creates a [[#reference|reference]] link as shown below'^[[#reference|#]]^'.%0a%0a'''[@[[!PageName]]@]''' creates a link to the PageName in the group called Category. See [[PmWiki/Categories]].%0a%0a'''[@[[~Author]]@]''' link creates a link to the page called Author in the Profiles group. %0a%0a'''[@~@][@~~@]''' markup creates a link for the current Author when it encounters three tilde characters ([@~@]) in a row ([@~@][@~@][@~@]). %0a%0a'''[@~~@][@~~@]''' markup creates a link for the current author and appends the current date and time when four tilde characters ([@~@]) in a row are encountered%0a%0a!!! [[#anchors]]Links to specific locations within a page -- "anchors"%0a%0aTo define a location within a page to which you may jump directly, use the markup [@[[#name]]@]. This creates an "anchor" that uniquely identifies that location in the page. Then to have a link jump directly to that anchor, use one of%0a%0a* [@[[#name|link text]]@] within the same page, or%0a* [@[[PageName#name]]@] or [@[[PageName#name|link text]]@] for a location on another page%0a* The form [@[[PageName(#name)]]@] may be useful for hiding the anchor text in a link. %0a%0aFor example, here's a link to the [[#intermaps | Intermaps]] section, below. %0a%0aNotes:%0a* %25red%25the anchor itself must begin with a letter%25%25, '''not a number'''%0a* a link to an anchor must have the '''same capitalization as the anchor''' itself. %0a* Spaces are not allowed in an anchor: "[@[[#my anchor]]@]" won't work, "[@[[#myanchor]]@]" will.%0a%0a!!! [[#actions]]Links to actions%0a%0aTo link to a specific action for the current page use [@[[{$FullName}?action=actionname|linkname]]@].%0a%0aExamples:%0a* [@[[{$FullName}?action=edit|Edit]]@] for the editing or%0a* [@[[{$FullName}?action=diff|differences]]@] for differences.%0a%0a!! Links outside the wiki%0a[[#externallinks]]%0a!!! Links to external sites ([=URLs=])%0a%0aLinks to external sites simply begin with a prefix such as 'http:', 'ftp:', etc. Thus [@http://google.com/@] and [@[[http://google.com/]]@] both link to Google. As with the above, an author can specify the link text by using the vertical brace or arrow syntax, as in [@[[http://google.com/ | Google]]@] and [@[[Google -> http://google.com]]@].%0a%0aIt is possible to set a "tooltip title" of the external link by adding it in quotes after the address:%0a(:markup caption='The tooltip title of the link is "Home of PmWiki"' class=horiz:)[@%0a[[http://www.pmwiki.org/"Home of PmWiki"|link]]%0a@]%0a%0aIf the external link includes (parentheses), escape these using [=%2528=] for "(" and [=%2529=] for ")" : %0a(:markup:)[=[[http://en.wikipedia.org/wiki/Wiki_%2528disambiguation%2529 | link to "Wiki (disambiguation)" ]]=]%0a%0a!!! Links to intranet (local) files%0a%0aYou can link to a file system by including the prefix [@'file:///'@] (for Internet Explorer at least). So [@file:///S:\ProjPlan.mpp@] and [@[[Shared S drive->file:///S:\]]@] are both valid links. On a Windows file system you may want to use network locations (eg \\server1\rootdirectory\subdirectory) rather than drive letters which may not be consistent across all users. Not all browsers will follow such links.%0a%0a!! Link characteristics%0a!!! [[#reference]]Links as References%0a%0aLinks may also be specified as '''References''', so the target appears as an anonymous ''numeric'' reference rather than a ''textual'' reference. The following markup is provided to produce sequential reference numbering within a PmWiki page:%0a%0aFormatting the link as: [@[[http://google.com |#]]@] produces: [[http://google.com |#]] as the link.%0a%0aSubsequent occurrence of the reference link format on the same page will be incremented automatically as per the following example: Entering [@[[http://pmwiki.com |#]]@] produces [[http://pmwiki.com |#]], [@[[#intermaps |#]]@] produces [[#intermaps |#]], and so on for further reference links.%0a%0a!!! [[#intermaps]]Intermaps%0a%0a[[Inter Map]] links are also supported (see [[Inter Map]]). In particular, the [@Path:@] InterMap entry can be used to create links using relative or absolute paths on the current site (e.g., [@Path:../../somedir/foo.html@] or [@Path:/dir/something.gif@]).%0a%0a!!! Links that open a new browser window%0a%0aTo have a link open in another window, use [@%25newwin%25...%25%25@]:%0a%0a* [@%25newwin%25 http://pmichaud.com %25%25@] produces %25newwin%25 http://pmichaud.com %25%25%0a* [@%25newwin%25 [[http://google.com/ | Google]] %25%25@] produces %25newwin%25 [[http://google.com/ | Google]]%25%25%0a* [@%25newwin%25 [[Main.WikiSandbox]] %25%25@] produces %25newwin%25 [[Main.WikiSandbox]]%25%25%0a%0aYou can also specify that links should open in a new window via the @@[=%25target=_blank%25...%25%25=]@@ attribute:%0a%0a(:markup class=horiz:)%0aThe following link %25target=_blank%25 http://pmichaud.com %25%25%0awill open in a new window.%0a(:markupend:)%0a%0a!!! [[#robots]]Links that are not followed by [[(PmWiki:)robots]]%0a%0aPrefix a link with [=%25rel=nofollow%25=] to advise %25newwin rel=nofollow%25[[http://robotstxt.org/|robots]] and [[http://validator.w3.org/checklink|link checkers]]%25%25 not to follow it.%0a%0a%0a!! Links and CSS Classes%0a%0aPmWiki automatically gives classes to several types of links. Among other things, this enables you to format each type differently.%0a%0aNote: This may be an incomplete list.%0a:.selflink:A link to the current page. Useful in sidebars to show "you are here".%0a:.wikilink:A link to another page within the wiki.%0a:.urllink:A link to a page outside the wiki.%0a%0a!! Notes%0a%0a'''Note:''' The default behavior of "+" above can be overridden to display the spaced title, rather than simply the title by adding the following to config.php:%0a->[@%0a## [[target |+]] title links%0aMarkup('[[|+', '%3c[[|',%0a "/(?>\\[\\[([^|\\]]+))\\|\\s*\\+\\s*]]/e",%0a "Keep(MakeLink(\$pagename, PSS('$1'),%0a PageVar(MakePageName(\$pagename,PSS('$1')), '\$Titlespaced')%0a ),'L')");%0a@]%0a%0a%0a>>faq%3c%3c [[#faq]]%0a%0aQ: How do I create a link that will open as a new window?%0a%0aA: Use the [@%25newwin%25@] wikistyle, as in:%0a(:markup class=horiz:) [=%25newwin%25 http://example.com/ %25%25=]%0a%0aQ: How do I create a link that will open a new window, and configure that new window?%0a%0aA: This requires javascript. See [[Cookbook:PopupWindow]].%0a%0aQ: How do I place a mailing address in a page?%0a%0aA: Use the [@mailto:@] markup, as in one of the following:%0a%0a(:markup class="horiz":)%0a* mailto:myaddress@example.com%0a* [[mailto:myaddress@example.com]]%0a* [[mailto:myaddress@example.com | email me]]%0a* [[mailto:myaddress@example.com?subject=Some subject | email me]]%0a(:markupend:)%0aThe markup @@[=[[mailto:me@example.=]com?%25red%25cc=%25%25someoneelse@example.com%25red%25&bcc=%25%25else@example.com%25red%25&subject=%25%25Pre-set Subject%25red%25&body=%25%25Pre-set body | display text]] =]@@ lets you specify more parameters like the message body and more recipients (may not work in all browsers and e-mail clients).%0a%0aSee also [[Cookbook:DeObMail]] for information on protecting email addresses from spammers.%0a%0aQ: How can I enable links to other protocols, such as nntp:, ssh:, xmpp:, etc?%0a%0aA: See [[Cookbook:Add Url schemes]] {Cookbook.AddUrlSchemes$:Summary}%0a%0aQ: How do I make a WikiWord link to an external page instead of a WikiPage?%0a%0aA: Use link markup. There are two formats:%0a%0a->[@[[http://example.com/ | WikiWord]]%0a[[WikiWord -> http://example.com/]]@]%0a%0aQ: How do I find all of the pages that link to another page (i.e., backlinks)?%0a%0aA: In the wiki search form, use @@link=Group.Page@@ to find all pages linking to Group.Page.%0a%0aA: Use the [@link=@] option of the [[[@(:pagelist:)@] directive -> PmWiki/PageLists#pagelistlink]], as in%0a%0a->[@(:pagelist link=SomePage list=all:) -- show all links to SomePage%0a(:pagelist link={$FullName} list=all:) -- show all links to the current page@]%0a%0a%0aQ: What link schemes does PmWiki support?%0aA: See [[PmWiki:Link schemes]] {PmWiki.LinkSchemes$:Summary}%0a%0aQ: How do I open external links in a new window or mark them with an icon?%0aA: See [[Cookbook:External links]] {Cookbook.ExternalLinks$:Summary}%0a%0aQ: How can I use an image as a link?%0aA: Use [=[[Page| Attach:image.jpg ]] or [[ http://site | http://site/image.jpg ]]=] See [[PmWiki/Images#links]]%0a time=1275732841