Template:EditButton: Difference between revisions

From HorizonXI Wiki
No edit summary
No edit summary
Line 1: Line 1:
<includeonly><onlyinclude><div style="text-align: right; font-size: 10pt; margin-bottom: {{{margin-bottom|-14px}}};"><span class="plainlinks">{{#ifexist:{{{1|}}}|<nowiki>[</nowiki> [https://horizonffxi.wiki/w/index.php?title={{#replace:{{{1}}}| |_}}&action=edit edit] <nowiki>]</nowiki>|<nowiki>[</nowiki> [https://horizonffxi.wiki/w/index.php?title={{#replace:{{{1}}}| |_}}&action=edit <span style="color: #dd3333;">create</span>] <nowiki>]</nowiki>}}</span></div></onlyinclude></includeonly>
<includeonly><onlyinclude><div style="text-align: right; font-size: 10pt; margin-bottom: {{{margin-bottom|0px}}};"><span class="plainlinks">{{#ifexist:{{{1|}}}|<nowiki>[</nowiki> [https://horizonffxi.wiki/w/index.php?title={{#replace:{{{1}}}| |_}}&action=edit edit] <nowiki>]</nowiki>|<nowiki>[</nowiki> [https://horizonffxi.wiki/w/index.php?title={{#replace:{{{1}}}| |_}}&action=edit <span style="color: #dd3333;">create</span>] <nowiki>]</nowiki>}}</span></div></onlyinclude></includeonly>


==Usage==
==Usage==
Line 10: Line 10:
<pre>
<pre>
{{EditButton|...
{{EditButton|...
| margin-bottom = -14px
| margin-bottom = 0px
}}
}}
</pre>
</pre>




Example:
Examples:
 
<pre>
<pre>
{{EditButton|West Sarutabaruta/Chocobo Digging}}
{{EditButton|West Sarutabaruta/Chocobo Digging}}
Line 23: Line 24:
{{EditButton|West Sarutabaruta/Chocobo Digging}}
{{EditButton|West Sarutabaruta/Chocobo Digging}}
{{:West Sarutabaruta/Chocobo Digging}}
{{:West Sarutabaruta/Chocobo Digging}}
|}
<pre>
{{EditButton|West Sarutabaruta/Chocobo Digging}}
{{:West Sarutabaruta/Chocobo Digging|margin-bottom=-14px}}
</pre>
{|
{{EditButton|West Sarutabaruta/Chocobo Digging}}
{{:West Sarutabaruta/Chocobo Digging|margin-bottom=-14px}}
|}
|}

Revision as of 15:06, 25 October 2023


Usage

Place an edit button to a transcluded element. If Page does not exist, shows a "create" button.

Note: at the moment, the button floats all the way to the right. If the element it is supposed to make editable isn't extending all the way to the right, the button needs to be contained somehow - if possible with the same container that restricts the element - so it remains close to the element.

Optional parameters (and default value):

{{EditButton|...
| margin-bottom = 0px
}}


Examples:

{{EditButton|West Sarutabaruta/Chocobo Digging}}
{{:West Sarutabaruta/Chocobo Digging}}
[ edit ]
Item Abundance
Lauan Log 15.3%Common(15.3%)
Little Worm 24.2%Very Common(24.2%)
Pebble 27.8%Very Common(27.8%)
Gysahl Greens 4.8%Very Rare(4.8%)
Bird Feather 3.4%Very Rare(3.4%)
Insect Wing 5.8%Rare(5.8%)
Moko Grass 6.3%Rare(6.3%)
Yagudo Feather 1.6%Very Rare(1.6%)
Saruta Cotton 4.8%Very Rare(4.8%)
Rosewood Log 5.6%Rare(5.6%)
Ebony Log 0.4%Extremely Rare(0.4%)
Tree Cuttings 0.2%Extremely Rare(0.2%)

= Requires Burrow  = Requires Egg Helm  = Requires Bore  = Obtainable only at Night



{{EditButton|West Sarutabaruta/Chocobo Digging}}
{{:West Sarutabaruta/Chocobo Digging|margin-bottom=-14px}}
[ edit ]
Item Abundance
Lauan Log 15.3%Common(15.3%)
Little Worm 24.2%Very Common(24.2%)
Pebble 27.8%Very Common(27.8%)
Gysahl Greens 4.8%Very Rare(4.8%)
Bird Feather 3.4%Very Rare(3.4%)
Insect Wing 5.8%Rare(5.8%)
Moko Grass 6.3%Rare(6.3%)
Yagudo Feather 1.6%Very Rare(1.6%)
Saruta Cotton 4.8%Very Rare(4.8%)
Rosewood Log 5.6%Rare(5.6%)
Ebony Log 0.4%Extremely Rare(0.4%)
Tree Cuttings 0.2%Extremely Rare(0.2%)

= Requires Burrow  = Requires Egg Helm  = Requires Bore  = Obtainable only at Night