Describes the TikiWiki syntax for creating hyperlinks
How to setup & use Tiki
Wiki-Syntax Links
In this page, you'll learn how to include links in your Wiki pages, including links to other Wiki pages within the same TikiWiki site, links to an external Wiki site, and links to the Web.Table of contents
Quick Reference
| To... | Optional Syntax1 | Default Syntax |
|---|---|---|
| Link to a Wiki page | WikiPageName Requires WikiWords2 |
((Wiki Page Name)) |
| Link to an external Wiki page | ExtWikiName: ExtWikiPageName Requires WikiWords2 |
((Ext Wiki Name: Ext Wiki Page Name)) |
| Link to a Web page | http://www.somesite.org Requires AutoLinks3 |
[http://www.somesite.org] or [http://www.somesite.org|Some Site!] |
- Tiki includes two options that modify the default link syntax: WikiWords and Autolink.
- To enable WikiWords:
- From the Administration: Wiki page, select the Features tab.
- On the Features tab, enable the WikiWords option.
If the WikiWords feature is disabled, you must use double parenthesis to create a Wiki page link. - To enable AutoLinks:
- From the Administration: Text Area page, select the General Settings tab. In Tiki 4.x this is renamed to Editing & Plugins.
- On the General Settings tab, in the Miscellaneous area, enable the AutoLinks option.
If the AutoLinks features is disabled, you must use the square brackets to create a link to an external page.
Linking Within a Tiki Site
Wiki Pages
When using the WikiWords option, Tiki will automatically detect Wiki page names and correctly format them as hyperlinksThe following are methods of creating links to Wiki pages
- TheWikiWay
Two or more words are stuck together (no spaces, but accept - [dash] and _ [underscore]), and each is capitalized. You must enable the WikiWords option to use this mothod. - ((The Wiki Way))
Use double parentheses around the page name to Wiki page names that include spaces or when the WikiWords option is not enabled. - (token-name(The Wiki Way))
Use a token-name reference to link to wiki pages using a semantic link, a qualifier. Semantic links were introduced in Tiki 3.0 and have to be enabled separately. See Semantic Admin for more information. Trick: This can be also used to put a class on a link.
This table lists additional methods for creating links to wiki pages.
| To... | Syntax | Result | Comment |
|---|---|---|---|
| Specify link text | ((PluginVersions|The Versions Plugin)) | The Versions Plugin | Use the vertical bar (| [pipe]) to separate the page name from the link text. |
| Link to a heading or anchor on another page | ((Using Wiki Pages|#The_Wiki_Menu)) | Using Wiki Pages | Tiki automatically creates anchors for headings on a Wiki page. For the heading or anchor, note the # character and underscores replacing spaces. |
| Link to heading or anchor and specify link text | ((Using Wiki Pages|#The_Wiki_Menu|The Wiki Menu)) | The Wiki Menu | |
| Use a custom color for the link text | ((Wiki-Syntax Text|~~#ff0000:Syntax for Text~~)) | Syntax for Text | By default, the color is defined by the Tiki theme (CSS). See Wiki-Syntax Text for more information. |
- If you save the page but see a question mark (?) after the page name, and you're sure the page exists, search for the page in the Search module to make sure you've typed the name correctly.
- When using WikiWords, Tiki will try to convert any word with odd capitalization into a Wiki link. Use double, reversed parentheses around a word to indicate that it should not be a wiki link — even when the WikiWords option is enabled. For example:
))WordStar(( will not become a link.
Articles, Blogs, Forums and Other Pages
For all other types of pages within a TikiWiki site, a shortened address can be used with square brackets. Here are some examples:| Type of Page | Syntax | Result |
|---|---|---|
| Article number 19 with link text |
[tiki-read_article.php?articleId=19] [tiki-read_article.php?articleId=19|News from doc.tw.o!] |
tiki-read_article.php?articleId=19 News from doc.tw.o! |
| Galleries | [tiki-galleries.php|Galleries] | Galleries |
| FAQ number 8 | [tiki-view_faq.php?faqId=8|FAQ on Images] | FAQ on Images |
| Shadowbox popup | [http://doc.tikiwiki.org/tiki-print.php?page=Wiki-Syntax+Links|See this page|shadowbox;title=shadowbox example;] shadowbox feature must be activated | See this page |
Attachments and Image Links
To create a link to an attachment to a wiki page, use PluginAttach or PluginFile. If you'd like for an image to act as a link, so that clicking on the image takes you to another page, see The img Tag heading on the Wiki-Syntax Images page.Navigation Links
Here are some plugins that provide navigational links:- PluginAname - creates an anchor on a wiki page.
- PluginAlink - links to an anchor in a wiki page. Use in conjunction with PluginAname
- PluginBack - creates a link to go back one page
- PluginBacklinks - shows all the pages that link to a page
- PluginRedirect - causes links to a page to redirect to another page
Linking to Other Wiki Sites
If the site administrator has enabled this option, shortened links to pages in an external Wiki can be created. You'll need to know the short name that the administrator has set up to use this feature - the information may be documented on the site in a TikiWiki Manual of Style or you can ask your administrator. See External Wikis for a complete explanation as well as the shortcut links for external wikis that have been defined on this site (under the heading List external wiki references.Linking to Web Pages
You can link to any page on the Web that has a valid URL. By default, Tiki creates a local cache of the page so that it will be available even if the remote Web site is down. Here are some examples of the syntax:| Description | Syntax | Result |
|---|---|---|
| Link to an external web page | [http://www.wiki-translation.com] | hhttp://www.wiki-translation.com |
| Specify link text | [http://www.wiki-translation.com |Wiki Translation] | Wiki Translation |
| With ))AutoLinks(( enabled | http://www.wiki-translation.com | http://www.wiki-translation.com |
| Using a color font | [http://www.tikiwiki.org|~~#ff0000:tw~~] | tw |
See the Quick Reference section above for how to set the AutoLinks administrative option. In addition, two more administrative options related to external links:
- To open external links in new window: Go to Admin Home > Text Area > Features section and check Open external links in new window and click "Change Preferences." If this feature is disabled, external links open in the existing browser window.
- To disable the external link icon (
): Go to Admin Home (tiki-admin.php?page=textarea)> Editing and Plugins > General Settings > External links and images and uncheck External link icon then click "Change Preferences." With this disabled, the icon (
) will no longer appear at the end of any external links. Keeping it enabled allows users to know when they are being directed to another site.
- [http://www.somesite.org/docs/chapter1.pdf |nocache]
- [http://www.somesite.org/docs/chapter1.pdf|Chapter One|nocache]
- If the link doesn't work, try copying the URL into your browser window, and click Enter. If the page exists, go back and check your typing. Chances are you'll find that you've made a typing error. Did you type both brackets correctly?
Linking to Email Addresses
To link to an Email Address, enclose the mailto URL within square brackets, as in the following examples:- Type this: [mailto:johndoe@someplace.com]
To get this: mailto:johndoe@someplace.com
- Type this: [mailto:johndoe@someplace.com | John Doe]
To get this: John Doe
Semantic Wiki
Starting from version 3.0, Tikiwiki supports semantic qualifiers on Wiki Links. To add a qualifier to the wiki link, the following syntax must be used:(qualifier-name(The Wiki Way))
- Qualifiers may contain lowecase letters (a-z) and dashes.
- The qualifier name will be added as a CSS class on the link to customize the display.
- Semantic relationships can be managed by administrators from Semantic Admin. Relationships can be viewed from Module semantic_links.
Related Pages
- AutoLinks - enable the option for tiki to automatically recognize external links as links
- External Wikis - create shortcut links to other wiki sites
- PluginAttach - a plugin for placing a link to an attachment on a page
- PluginFile - similar to PluginAttach
- PluginAname - creates an anchor onto a wiki page
- PluginAlink - links to an anchor in a wiki page. Use in conjunction with PluginAname
- PluginBack - creates a link to go back one page
- PluginBacklinks - shows all the pages that link to a page
- PluginRedirect - causes links to a page to redirect to another page
- The img Tag - turn an image into a link
Contributors to this page: beejay
,
tschutter
,
tobi_h
,
system
,
sylvie
,
StarRider
,
Scot Wilcoxon
,
Rick
,
nkoth
,
MelanieR
,
Michael Davey
,
Marc Laporte
,
Fabián Rodríguez
,
lphuberdeau
,
lindon
,
J
,
fivos
,
DennisDaniels
,
Philippe Cloutier
,
CharlieChance
and
bpfaffenberger
.
Page last modified on Tuesday 23 February, 2010 04:30:14 UTC by beejay
.
