Template:Book/Link

From open-support.info

(Difference between revisions)
Jump to: navigation, search
m
m
Line 2: Line 2:
|{{#vardefine:page|{{#rel2abs:{{#replace:{{{1}}}|~|{{#titleparts:{{FULLPAGENAME}}|1}}}}}}
|{{#vardefine:page|{{#rel2abs:{{#replace:{{{1}}}|~|{{#titleparts:{{FULLPAGENAME}}|1}}}}}}
  }}{{#if:{{#var:page}}
  }}{{#if:{{#var:page}}
-
  |[[{{#var:page}}|{{#if:{{{2|}}}
+
  |[[{{#var:page}}{{#if:{{{anchor|}}}|#{{{anchor}}} }}|{{#switch:THEN
-
   |{{{2}}}
+
  |{{#if:{{{2|}}}|THEN}}={{{2}}}
 +
   |{{#if:{{{anchor|}}}|THEN}={{{anchor}}}
   |{{Book/PageTitle
   |{{Book/PageTitle
   |{{#var:page}}
   |{{#var:page}}

Revision as of 07:09, 24 April 2011

{{#if: |{{#if:{{{1}}}

|[[{{{1}}}|
!
!+
!-
&
+!
-
-
-
/
//
//Chapter 1
//Chapter 2
//Chapter 2/2
//Chapter 2/5
//Chapter 3
//Chapter 3/1
//Chapter 3/1/1
//Chapter 3/1/2
/1
/Chapter 2
/Preface
101
105
106
109
110
111
112
113
114
115
116
3
50
68
95
97
98
99
=
Admin Manual
Allows value
Allows value
Ambox content.png
Ambox deletion.png
Ambox move.png
Ambox notice.png
Ambox protection.png
Ambox speedy deletion.png
Author
… further results

warning.pngSome part "<nowiki></nowiki>" of the query was not understood. Some subquery has no valid condition. ]] }} 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