Template Edit Button
this wiki
Forum page
This Forum has been archived
Visit the new ForumsTo contact staff directly or to report bugs, please use Special:Contact.
Hi, I created a multi-purpose template on my wiki, but it has no edit button (which means I can only use it on one article). Please tell me how to fix it here. Thanks Superlana (talk) 18:49, August 15, 2012 (UTC)
- Do you want an edit button on the template for editing the template page? Why can you only use it on one article? Monchoman45 Talk Contribs Skystone 18:52,8/15/2012
If that is what you are trying to do then this is what the template will look like.
{|<onlyinclude><div style="border-radius: 10px; padding: 5px; margin: 15px 0; width: 100%; background-color:#e7cbb7;"
| colspan=2 style="text-align:center; font-weight:bold; background-color:#e8d7ca; border-radius: 5px; padding: 2px;" | <span style="color:white"> Articles that are relevant to {{PAGENAME}}. </span> <span style="font-size: 75%; position: absolute; right: 24px;"> →</span>
|-
| style="background-color:#e8d7ca; border-radius: 5px; padding: 2px;" | <span style="color:white">#01</span> {{#if:{{{1|}}}|row that you want to appear}}
| style="background-color:#e8d7ca; border-radius: 5px; padding: 2px;" | <span style="color:white">#04</span> {{#if:{{{4|}}}|row that you want to appear}}
|-
| style="background-color:#e8d7ca; border-radius: 5px; padding: 2px;" | <span style="color:white">#02</span> {{#if:{{{2|}}}|row that you want to appear}}
| style="background-color:#e8d7ca; border-radius: 5px; padding: 2px;" | <span style="color:white">#05</span> {{#if:{{{5|}}}|row that you want to appear}}
|-
| style="background-color:#e8d7ca; border-radius: 5px; padding: 2px;" | <span style="color:white">#03</span> {{#if:{{{3|}}}|row that you want to appear}}
| style="background-color:#e8d7ca; border-radius: 5px; padding: 2px;" | <span style="color:white">#06</span> {{#if:{{{6|}}}|row that you want to appear}}
|}
<noinclude>
[[Category:Templates]]</noinclude>
Then you just input this into the page you want it on, but replace the "ARTICLE1", "ARTICLE2", "ARTICLE3", etc. with what you want to appear in the template.
{{Relevant|ARTICLE1|ARTICLE2|ARTICLE3|ARTICLE4|ARTICLE5|ARTICLE6}}
Rocketslime_1_1 Talk Wall Contribs 19:10,8/15/2012
Yes, thank you very much.Superlana (talk) 19:17, August 15, 2012 (UTC)
Sorry to be a bother, but how do I hide the cells I don't use.Superlana (talk) 20:12, August 15, 2012 (UTC)
- To do that you have to use an "if" thing. To do that follow this code.
{{#if:{{{1|}}}|row that you want to appear}} - But I recommend you put the code for a cell as "Template:Cell" or something like that so that there aren't problems with the code (instead of the cell number put "{{{1}}}", then instead of the code above use this for each cell (except change the number for each).
{{#if:{{{1|}}}|{{Cell|{{{1}}}}} - If you need any help doing that I can help.
Rocketslime_1_1 Talk Wall Contribs 20:23,8/15/2012
Thanks for responding, do I create a Cell Template with the second code, and then insert the first code row that you want to appear into the Template Relevant. Check out the example box. Superlana (talk) 20:45, August 15, 2012 (UTC)
I tried it both ways and it didn't world, could you please help.Superlana (talk) 22:29, August 15, 2012 (UTC)
- I fixed it so it works.
Rocketslime_1_1 Talk Wall Contribs 02:24,8/16/2012
Thank you; question: should I delete this page, is it nessecary. Template:Cell.Superlana (talk) 09:46, August 16, 2012 (UTC)
- Nope, leave that in as the template now uses it.
Rocketslime_1_1 Talk Wall Contribs 14:18,8/16/2012