Editing Template:Link/Create+Desc
From PCSAR
Warning: You are not logged in. Your IP address will be recorded in this page's edit history.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Current revision | Your text | ||
Line 1: | Line 1: | ||
<noinclude>{{documentation}}</noinclude><includeonly><!-- | <noinclude>{{documentation}}</noinclude><includeonly><!-- | ||
- | -->{{ | + | Do we have to use Parameter to index.php? We want to avoid them because redlink handling is different |
+ | in internal links than external links. Although we try to make it look as close to the original as | ||
+ | possible, it's not quite. | ||
+ | * red links that have been visited don't get a faded colour. | ||
+ | * hovering over an external link underlines it in blue, even if it's a red link. | ||
+ | * The red we chose ignores the user's preference of stylesheet, etc. | ||
+ | |||
+ | http://www.mediawiki.org/wiki/Manual:Parameters_to_index.php#Options_affecting_the_edit_form | ||
+ | |||
+ | -->{{#if: {{{Preload|}}}{{{Editintro|}}}<!-- | ||
+ | |||
+ | -->|<!-- | ||
+ | |||
+ | We were given index.php parameters | ||
+ | |||
+ | -->{{#ifexist: {{{1}}}<!-- | ||
+ | |||
+ | -->|<!-- | ||
+ | |||
+ | The page exists, we don't need the index.php parameters; use an internal link. | ||
+ | |||
+ | -->{{Link/Desc|1={{{1|}}}|2={{{2|}}}|Desc={{{Desc|}}}}}<!-- | ||
+ | |||
+ | -->|<!-- | ||
+ | |||
+ | We have to use index.php parameters to a non-existing page. | ||
+ | Use an external link, but make it look as much like an internal link as we can. | ||
+ | |||
+ | Don't paint the external link fancy (no arrow). | ||
+ | |||
+ | --><span class="plainlinks"><!-- | ||
+ | |||
+ | Create the external link | ||
+ | |||
+ | -->[<!-- | ||
+ | |||
+ | The URL marked up with parameters. | ||
+ | Parameters that aren't specified will be blank which defaults to no action. | ||
+ | |||
+ | -->{{fullurl:{{{1}}}|action=edit&preload={{{Preload|}}}&editintro={{{Editintro|}}}}}<!-- | ||
+ | |||
+ | A space separates the URL from the link text | ||
+ | |||
+ | --> <!-- | ||
+ | |||
+ | Paint the link red. | ||
+ | |||
+ | --><span style="color: #ba0000;"><!-- | ||
+ | |||
+ | Compute what text to display. | ||
+ | |||
+ | -->{{Link/Desc/Text|1={{{1|}}}|2={{{2|}}}|Desc={{{Desc|}}}}}<!-- | ||
+ | |||
+ | --></span><!-- | ||
+ | |||
+ | -->]<!-- | ||
+ | |||
+ | --></span><!-- | ||
+ | |||
+ | -->}}<!-- | ||
+ | |||
+ | -->|<!-- | ||
+ | |||
+ | There were no index.php parameters; we can use an internal link. | ||
+ | |||
+ | -->{{Link/Desc|1={{{1|}}}|2={{{2|}}}|Desc={{{Desc|}}}}}<!-- | ||
+ | |||
+ | -->}}<!-- | ||
--></includeonly> | --></includeonly> |