Template:Book/Link

From open-support.info

< Template:Book(Difference between revisions)
Jump to: navigation, search
m
m
 
(15 intermediate revisions not shown)
Line 1: Line 1:
-
<onlyinclude>{{
+
{{#if:{{{1|}}}
-
#if:{{{1|}}}
+
|{{#vardefine:page|{{#rel2abs:{{#replace:{{{1}}}|~|{{#titleparts:{{FULLPAGENAME}}|1}}}}}}
-
|{{Book/Link/core
+
}}{{#if:{{#var:page}}
-
|{{#switch:{{#show:{{FULLPAGENAME}}|?docinfo main#}}
+
|[[{{#var:page}}#{{#if:{{{anchor|}}}|{{{anchor}}} }}|{{#switch:THEN
-
  |{{ns:0}}
+
   |{{#if:{{{2|}}}|THEN}}={{{2}}}
-
  |{{FULLPAGENAME}}={{#rel2abs:{{FULLPAGENAME}}|{{{1}}} }}
+
  |{{#if:{{{anchor|}}}|THEN}}={{{anchor}}}
-
   |{{#rel2abs:{{NAMESPACE}}:{{BASEPAGENAME}}|{{{1}}} }}/{{SUBPAGENAME}}
+
   |{{Book/PageTitle
-
   }}
+
  |{{#var:page}}
-
|{{{2|}}}
+
  |show={{{show|}}}
 +
  }}
 +
  }}]]
  }}
  }}
-
}}</onlyinclude>
+
}}<noinclude>
-
 
+
{{documentation includeonly}}
-
== Syntax ==
+
{{docinfo
-
<pre>
+
|author = Dick6809
-
{{Book/Link [|['path'][|['text']]]}}
+
|desc = produce a link with a respectable page title from relative path.
-
</pre>
+
}}
-
 
+
{{documentation}}
-
* '''path''' - Relative or absolute path list to destination page from the current page.  The page language sufix will be supplied automatically if it is required.
+
</noinclude>
-
* '''text''' - Alternative text which will be shown instead of page title.
+
-
 
+
-
Please see below how to describe path in this page:
+
-
<pre>
+
-
If you are in              Type          Destination page name is      Note
+
-
--------------------------  ------------  ----------------------------  ----------------
+
-
Sample Book/Chapter 1/3/de  ..            Sample Book/Chapter 1/de      Parent page
+
-
                            ../4          Sample Book/Chapter 1/4/de    Sibling page
+
-
                            /1            Sample Book/Chapter 1/3/1/de  Child page
+
-
                            :Foo/Bar/Buz  Foo/Bar/Buz/de                Absolute path
+
-
</pre>
+
-
 
+
-
== Related pages ==
+
-
* [[Template:Book]]
+

Latest revision as of 07:22, 24 April 2011

The results of this template are not shown here.

[edit] [purge] Template documentation

Template:Book/Link – produce a link with a respectable page title from relative path.

Syntax

 {{Book/Link [|['path'][|['text']]]}}
  • path - Relative or absolute path list to destination page from the current page. The page language sufix will be supplied automatically if it is required.
  • text - Alternative text which will be shown instead of page title.

Please see below how to describe path in this page:

 If you are in               Type          Destination page name is      Note
 --------------------------  ------------  ----------------------------  ----------------
 Sample Book/Chapter 1/3/de  ..            Sample Book/Chapter 1/de      Parent page
                             ../4          Sample Book/Chapter 1/4/de    Sibling page
                             /1            Sample Book/Chapter 1/3/1/de  Child page
                             :Foo/Bar/Buz  Foo/Bar/Buz/de                Absolute path

Related pages

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox