|
|
Line 1: |
Line 1: |
- | This template is used to create a link to a page.
| + | #REDIRECT [[Template:Link/Desc/Doc]] |
- | | + | |
- | It's purpose is very similar to creating links with double square brackets.
| + | |
- | | + | |
- | The benefit of using <code>{{((}}link|</code> is that if a description is not provided
| + | |
- | the link defaults to the description the page provides by using [[Template:desc]], etc.
| + | |
- | | + | |
- | Just like with double square brackets, if you have preferred text for the link, you can provide it.
| + | |
- | | + | |
- | | + | |
- | For illustration, suppose we have two pages:
| + | |
- | * "[[Demo/Page with description]]" uses [[Template:desc]] to define a description.
| + | |
- | * "[[Demo/Page without description]]" doesn't use [[Template:desc]] and doesn't have a description.
| + | |
- | | + | |
- | {{demo table|
| + | |
- | {{demo row|<nowiki>{{link|Demo/Page with description}}</nowiki>|<!--
| + | |
- | -->{{link|Demo/Page with description}} }}
| + | |
- | {{demo row|<nowiki>{{link|Demo/Page without description}}</nowiki>|<!--
| + | |
- | -->{{link|Demo/Page without description}} }}
| + | |
- | {{demo row|<nowiki>{{link|Demo/Page with description|this page}}</nowiki>|<!--
| + | |
- | -->{{link|Demo/Page with description|this page}} }}
| + | |
- | {{demo row|<nowiki>{{link|Demo/Page without description|this page}}</nowiki>|<!--
| + | |
- | -->{{link|Demo/Page without description|this page}} }}
| + | |
- | }}
| + | |
- | | + | |
- | Here's how it would work if you had used square brackets instead:
| + | |
- | {{demo table|
| + | |
- | {{demo row|[[Demo/Page with description]]}}
| + | |
- | {{demo row|[[Demo/Page without description]]}}
| + | |
- | {{demo row|[[Demo/Page with description|this page]]}}
| + | |
- | {{demo row|[[Demo/Page without description|this page]]}}
| + | |
- | }}
| + | |
- | The difference is only in the first case.
| + | |