Template:GARLetterLink: Difference between revisions
Template page
More actions
Palindromayd (talk | contribs) No edit summary |
Palindromayd (talk | contribs) No edit summary |
||
| Line 3: | Line 3: | ||
letter's page already exists: if it does, it becomes an ordinary blue link (no "Creating"); | letter's page already exists: if it does, it becomes an ordinary blue link (no "Creating"); | ||
if not, it stays a green link that auto-creates the page on click. No Save screen either way. | if not, it stays a green link that auto-creates the page on click. No Save screen either way. | ||
Usage (via AZGrid): {{GARLetterLink|A|Template:Preload/CountryLetter}} | |||
</noinclude><includeonly><span class="gar-instant-letter" data-title="{{FULLPAGENAME}}/{{{1}}}" data-preload="{{{2}}}">{{{1}}}</span></includeonly> | Usage (via AZGrid): {{GARLetterLink|A|Template:Preload/CountryLetter}} | ||
Pointing somewhere else: {{GARLetterLink|A|Template:Preload/PoliceLetter|base=GAR:Police}} | |||
"base" is optional. Left out, the letters are subpages of the page you are on. | |||
</noinclude><includeonly><span class="gar-instant-letter" data-title="{{#if:{{{base|}}}|{{{base}}}|{{FULLPAGENAME}}}}/{{{1}}}" data-preload="{{{2}}}">{{{1}}}</span></includeonly> | |||
Revision as of 01:03, 21 July 2026
Outputs one A–Z letter as a clickable element. Common.js checks on load whether that letter's page already exists: if it does, it becomes an ordinary blue link (no "Creating"); if not, it stays a green link that auto-creates the page on click. No Save screen either way.
Usage (via AZGrid): A Pointing somewhere else: A "base" is optional. Left out, the letters are subpages of the page you are on.