Template:Page link/doc: Difference between revisions
Appearance
Forgottenman (talk | contribs) m →Usage: note |
Forgottenman (talk | contribs) m update for parameter switch |
||
| Line 3: | Line 3: | ||
This template is used to create links to pages in the '''Page''' namespace, while preventing those links from appearing in the '''Main''' namespace. Its primary use is in the tables of contents of books. | This template is used to create links to pages in the '''Page''' namespace, while preventing those links from appearing in the '''Main''' namespace. Its primary use is in the tables of contents of books. | ||
<code><nowiki>{{</nowiki>page link|'' | <code><nowiki>{{</nowiki>page link|''link target''|''text to display''<nowiki>}}</nowiki></code> | ||
The link target must be in the Page namespace. | The link target must be in the Page namespace. | ||
===Example=== | ===Example=== | ||
For example, <code><nowiki>{{</nowiki>page link | For example, <code><nowiki>{{</nowiki>page link|Marxism Unmasked.pdf/9|page 9<nowiki>}}</nowiki></code> gives: | ||
*In the main namespace: page 9 | *In the main namespace: page 9 | ||
*In the page namespace | *In the page namespace: {{page link|Marxism Unmasked.pdf/9|page 9}} | ||
Note that "Page:" should not be included in the link target. | Note that "Page:" should not be included in the link target. | ||
Latest revision as of 23:06, 10 March 2011
| This is a documentation subpage for Template:Page link. It contains usage information, categories and other content that is not part of the original template page. |
Usage
This template is used to create links to pages in the Page namespace, while preventing those links from appearing in the Main namespace. Its primary use is in the tables of contents of books.
{{page link|link target|text to display}}
The link target must be in the Page namespace.
Example
For example, {{page link|Marxism Unmasked.pdf/9|page 9}} gives:
- In the main namespace: page 9
- In the page namespace: page 9
Note that "Page:" should not be included in the link target.