Template:Link/Create/Doc
From PCSAR
(Difference between revisions)
(New page: {{Template:Link/Doc/Related}} {{Template Doc|<nowiki>Page|Text|Desc=description|Preload=boilerplate|Editintro=intro</nowiki>}} is used to create a link to a page. ; Page : the page to lin...) |
|||
Line 5: | Line 5: | ||
; Page : the page to link to | ; Page : the page to link to | ||
; Text : (optional) the text to display as the link | ; Text : (optional) the text to display as the link | ||
- | ; Preload : (optional) When ''Page'' does not exist, following the link will create it with the page ''boilerplate'' already loaded into the editor. | + | ; Preload : (optional) When ''Page'' does not exist, following the link will create it with the page ''boilerplate'' already loaded into the editor. Should not include spaces - use _. |
- | ; Editintro : (optional) When ''Page'' does not exist, following the link will display the page ''intro'' before the edit window rather than the normal instructions | + | ; Editintro : (optional) When ''Page'' does not exist, following the link will display the page ''intro'' before the edit window rather than the normal instructions. Should not include spaces - use _. |
With this template | With this template | ||
Line 29: | Line 29: | ||
{{demo row|<nowiki>{{Link/Create|Demo/Does not exist|this page|Preload=Demo/Boilerplate}}</nowiki>|<!-- | {{demo row|<nowiki>{{Link/Create|Demo/Does not exist|this page|Preload=Demo/Boilerplate}}</nowiki>|<!-- | ||
-->{{Link/Create|Demo/Does not exist|this page|Preload=Demo/Boilerplate}} }} | -->{{Link/Create|Demo/Does not exist|this page|Preload=Demo/Boilerplate}} }} | ||
+ | {{demo row|<nowiki>{{Link/Create|Demo/Does not exist||Preload=Demo/Boilerplate}}</nowiki>|<!-- | ||
+ | -->{{Link/Create|Demo/Does not exist||Preload=Demo/Boilerplate}} }} | ||
+ | {{demo row|<nowiki>{{Link/Create|Main Page|this page|Preload=Demo/Boilerplate}}</nowiki>|<!-- | ||
+ | -->{{Link/Create|Main Page|this page|Preload=Demo/Boilerplate}} }} | ||
+ | {{demo row|<nowiki>{{Link/Create|Main Page||Preload=Demo/Boilerplate}}</nowiki>|<!-- | ||
+ | -->{{Link/Create|Main Page||Preload=Demo/Boilerplate}} }} | ||
}} | }} | ||
Current revision
Related Templates | |
---|---|
Link/Create | Create from template |
Link/Desc | Use page's description |
Link/Create+Desc | Combine Link/Create and Link/Desc |
Link | Default; same as Link/Desc |
The template {{Link/Create|Page|Text|Desc=description|Preload=boilerplate|Editintro=intro}}
is used to create a link to a page.
- Page
- the page to link to
- Text
- (optional) the text to display as the link
- Preload
- (optional) When Page does not exist, following the link will create it with the page boilerplate already loaded into the editor. Should not include spaces - use _.
- Editintro
- (optional) When Page does not exist, following the link will display the page intro before the edit window rather than the normal instructions. Should not include spaces - use _.
With this template rather than just dumping you into a blank editor if you follow a link to a page that hasn't been created yet, Preload can be used to give the editor some initial boilerplate text. As well, Editintro can be used to give some specific instructions on how to change the boilerplate.
For illustration purpose, the following demonstration pages have been set up:
- "Demo/Does not exist" is a page that hasn't been created.
- "Demo/Boilerplate" is boilerplate text that we want to have loaded into our editor.
- "Demo/Editintro" are the instructions we want to see when we start creating the page.
You type... | You get... |
---|---|
{{Link/Create|Demo/Does not exist|Preload=Demo/Boilerplate|Editintro=Demo/Editintro}} | Demo/Does not exist |
{{Link/Create|Demo/Does not exist|Preload=Demo/Boilerplate}} | Demo/Does not exist |
{{Link/Create|Demo/Does not exist|Editintro=Demo/Editintro}} | Demo/Does not exist |
{{Link/Create|Demo/Does not exist|this page|Preload=Demo/Boilerplate}} | this page |
{{Link/Create|Demo/Does not exist||Preload=Demo/Boilerplate}} | Demo/Does not exist |
{{Link/Create|Main Page|this page|Preload=Demo/Boilerplate}} | this page |
{{Link/Create|Main Page||Preload=Demo/Boilerplate}} | Main Page |
[edit] Implementation
Helper templates: