Year of the Dragon: Through May 28th, claim free Expansion Pack (excluding Vecna Unleashed) or a Greater Elixir of Discovery! Speak to Xatheral in the Hall of Heroes.
Known Issue: Xatheral has been temporarily disabled while we investigate a bug with Year of the Dragon gift delivery.DDO Forums edit
Game mechanics • Newbie guide • In development • DDO Store • Social Media
Challenges • Classes • Collectables • Crafting • Enhancements • Epic Destinies • Favor • Feats
Glossary • Items • Maps • Monsters • Places • Quests • Races • Reincarnation • Skills • Spells
Please create an account or log in to build a reputation and unlock more editing privileges, and then visit DDO wiki's IRC Chat/Discord if you need any help!
Talk:Template Troubles
I'm no expert when it comes to templates but... I'm about to start working on a wiki project that relies heavily on tables but first I want to make a template to ease my work. In their most basic form the tables would look like in Example 1 but more often than not they'd be a tad more complex, like in Example 2. With Template:IE I can emulate everything from those examples with the exception of column 1, I don't know how to expand it over more than 1 row like in Example 2.
Any suggestions from someone more experienced on how to get this right? by Mjoll 15:16, March 12, 2012 (EDT)
Example 1
1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|
aaa | bbb | ccc | ddd | eee | fff |
Example 2
1 | 2 | 3 | 4 | 5 | 6 |
---|---|---|---|---|---|
aaa | bbb | ccc ccc |
ddd ddd |
eee eee |
fff fff |
bbb | ccc ccc ccc ccc |
ddd ddd ddd ddd |
eee eee eee eee |
fff fff fff fff | |
bbb | ccc | ddd | eee | fff |
Template (half working)
Enchantment | Effect | Item | Item type | ML | Obtained from |
- First thing you need to do is shy away from using the default argument names (eg. {{{1}}}, {{{2}}}, ...) and define your names (eg. {{{col 1}}}, {{{col 2}}}, ...). At this point you could add another argument named {{{col 1 span|1}}}. This way, you can set |col 1 span = 3 on your calling page and add ...{{#ifeq:{{{col 1|0}}}|0||colspan = "{{{col 1 span|1}}}"}}... in your Template:IE. The trick with this is to make sure that you set |col 1 = 0 on the next two lines or it will break and fail. ShoeMaker 15:47, March 12, 2012 (EDT)
- How would the finished template look like? I tried to make the changes you suggested but I only made it worse. by Mjoll 14:04, March 13, 2012 (EDT)
- You did just fine, I only moved a couple things around so that they would be in the correct order.. Tests below. ShoeMaker 14:55, March 13, 2012 (EDT)
Enchantment | Effect | Item | Item type | ML | Obtained from |
aaa | bbb | ccc ccc |
ddd ddd |
eee eee |
fff fff |
bbb | ccc ccc ccc ccc |
ddd ddd ddd ddd |
eee eee eee eee |
fff fff fff fff |
|
bbb | ccc | ddd | eee | fff | |
aaa | bbb | ccc ccc |
ddd ddd |
eee eee |
fff fff |
bbb | ccc ccc ccc ccc |
ddd ddd ddd ddd |
eee eee eee eee |
fff fff fff fff |
|
bbb | ccc | ddd | eee | fff | |
bbb | ccc ccc |
ddd ddd |
eee eee |
fff fff |
|
bbb | ccc ccc ccc ccc |
ddd ddd ddd ddd |
eee eee eee eee |
fff fff fff fff |
|
bbb | ccc | ddd | eee | fff | |
aaa | bbb | ccc ccc |
ddd ddd |
eee eee |
fff fff |
aaa | bbb | ccc ccc ccc ccc |
ddd ddd ddd ddd |
eee eee eee eee |
fff fff fff fff |
aaa | bbb | ccc | ddd | eee | fff |
- There, after much tweaking and a change from wikitable to html table coding, it seems to work for what you want.. ShoeMaker 14:55, March 13, 2012 (EDT)
- Excellent. Thank you Technical, that's exactly what I was looking for. by Mjoll 15:51, March 14, 2012 (EDT)