Skip to main content.
Navigation: Home | Edit | HistoryLoginBackLinkIndex
Breadcrumbs : changelog » sysreq » features » page1 » index » 2005feb » linkpage

Creating & Linking Pages

The one advantage a wiki engine has over conventional html is the author does not need to know the html syntax required to link pages together. For example <a href="www.turland.net" >text</a>

 

A wiki provides a simplified markup to perform all its tasks. The markup required to link pages in WikiDX is to surround the page name with double square brackets, ie [[mypage]]. This would link to a page called mypage. \\As part of creating the link, the wiki has a look to see if the page exists or not, if it does then a standard link is created. If the page does not exist, a class='urlintNew' is added to the link. <a class='urlintNew' href='/play/ideas/wikidx3/wikidx.php?page=wikidx/docs/pageedit' >Editing a page</a> 
<a href='/play/ideas/wikidx3/wikidx.php?page=wikidx/docs/newpage' >Linking to pages</a>  
By setting a css entry against this class name, the link to the non-existent page can be displayed differently.

 

 

Changing link text

By default, the text displayed for a link will be the page name only. This text can be changed by following the link with a space followed by any freeform text. The alternate text can of course, also be an image. [[mypage link to my page]] - would generate text of 'link to my page' which links to page 'mypage'. 
[[mypage img/smileys/sheep.gif]] - would use the image as the link to page 'mypage'. 

 

 

Links to non-wiki items

Linking to external resource follows the same rules for creating internal links. Surround the http call with double brackets, for example [[http://www.google.com]] 
[[file://share/file.xls]] 
[[mailto:....]] 

 

 

Accessing Groups

The ability to group, and subgroup pages to any level is a feature os this wiki. To allow navigation around all these levels needs some rules.

 

All links on a page are relative to the group that page is in. for example... Assume the current page is wikidx/docs/docindex, The page group will be wikidx/docs 
 
[[page1]] - Create a link to wikidx/docs/page1 
[[g1/page2]] - Create a link to wikidx/docs/g1/page2 

 

Thats great for going deeper and deeper into grouping structures, but what if you need to view a page at a higher grouping level.. You simply instruct the link to go up a level by preceeding the link with the 'back character' (a '<'). For multiple levels simply add more back characters.

 

Suppose you wanted to link to a page in a completely different grouping tree. Rather than trying to work out how many '<' to apply, preceed the link with a ':' (colon). This instructs the link to start from the top most level Assume the current page is wikidx/docs/cookbook/recipies, The page group will be wikidx/docs/cookbook 
 
[[page1]] - Create a link to wikidx/docs/cookbook/page1 
[[<page2]] - Create a link to wikidx/docs/page2 
[[<<page99]] - Create a link to wikidx/page99 
[[<<<page44]] - Create a link to page44 
[[:g2/page3]] - Create a link to g2/page3 

 

It should be mentioned, that in a 'safe-mode' where mkdir() is disabled, the '/' character is replace with a '_' (underscore) to create a long file name