NexusWiki:Discussions:Using templates for common tables: Difference between revisions

From NexusWiki
mNo edit summary
No edit summary
 
Line 41: Line 41:


--[[User:PhantomSnake|PhantomSnake]] 19:53, 21 Aug 2005 (EDT)
--[[User:PhantomSnake|PhantomSnake]] 19:53, 21 Aug 2005 (EDT)
Sure...but we should then have a page that has a list of all the available templates, and make sure that everyone knows they should use them. Also, does that mean that if someone changes the template format, it will automatically change it for every example of it throughout the wiki?
--[[User:Ahante|Ahante]] 00:44, 8 Feb 2006 (EST)

Latest revision as of 21:44, 7 February 2006

Here's an idea I had... We could use templates to simplify the use of tables and ensure a consistent look. I'll use the Hunting areas table on the Buya as an example. Currently the table code looks like this:

{|
|-style="background:silver"
| Area || Location || Prerequisites
|-
| [[Buya rat cave | Rat cave]] || 0015 0077 || Level 3
|-
| [[Buya rabbit cave | Rabbit cave]] || 0111 0125 || Level 9
|-
| [[Buya fox cave | Fox cave]] || 0124 0143 || Level 20
|-
| [[Sute's cave]] || 0103 0022 || Level 28, [[Sute dye]]
|-
| [[Buya haunted house | Haunted house]] || 0009 0065 || Level 36
|}

We could replace the top portion (the first row) with a template. Then, the new code would be:

{{Hunting area table}}
| [[Buya rat cave | Rat cave]] || 0015 0077 || Level 3
|-
| [[Buya rabbit cave | Rabbit cave]] || 0111 0125 || Level 9
|-
| [[Buya fox cave | Fox cave]] || 0124 0143 || Level 20
|-
| [[Sute's cave]] || 0103 0022 || Level 28, [[Sute dye]]
|-
| [[Buya haunted house | Haunted house]] || 0009 0065 || Level 36
{{/Hunting area table}}

The {{/Hunting area table}} template is just for symmetry. (We could have a generic {{End table}} template, but that's less flexible. However, we could use {{End table}} inside {{/Hunting area table}}.)

I created an example of this setup here.

Opinions?

--PhantomSnake 19:53, 21 Aug 2005 (EDT)


Sure...but we should then have a page that has a list of all the available templates, and make sure that everyone knows they should use them. Also, does that mean that if someone changes the template format, it will automatically change it for every example of it throughout the wiki? --Ahante 00:44, 8 Feb 2006 (EST)